greetings,

I have a shell scrip that requires a Users input. How can I map the delete key incase they make a mistake ?

example;

echo " hey enter some words ";
read X
##now user types something
lets say soimethiong^H^H
-----

## and foo bars it and try to hit delete.

Is there a way I can map the delete key prior to this operation ? using osx.
thanks for any advice
-j