When the user is prompted for a directory in a script
and they just hit enter, how do I determine that
nothing was entered.
I have tried numerous variations of the script below
and cannot make it work. (and i have no hair left).
I never get the "Nothing entered" echo.
echo "Enter new directory: \c"
read newdir
set $newidr
if [ $1 -lt 1 ]
then
echo "Nothing Entered"
else
cd $newdir
if
and they just hit enter, how do I determine that
nothing was entered.
I have tried numerous variations of the script below
and cannot make it work. (and i have no hair left).
I never get the "Nothing entered" echo.
echo "Enter new directory: \c"
read newdir
set $newidr
if [ $1 -lt 1 ]
then
echo "Nothing Entered"
else
cd $newdir
if