
May 24th, 2012, 01:29 PM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 14
Time spent in forums: 6 h 41 m
Reputation Power: 0
|
|
Read command issues
Looks like I am running into all sort of issues.
I am trying to read from user input in a certain condition.
The script doesn't wait for user input at all.
Code:
Original
- Code |
|
|
|
if [[ $COMMAND -eq 0 ]]; then
# read the Name from User
echo "Please enter Name:"
read NAME
echo "Name read from user:"$NAME
fi
# Call the ksh file
./callOtherScript.ksh $NAME
The script prints
Please enter Name:
Name read from user:
I tried with many combination of "read" command like read -rn 0 NAME. Still not working.
|