"David E.Fox" Here is the bash script I am having problems with...It was copied from the cdrom for "Linux Shells by Example". (The lines between the strings of ****.. are the script in question.) ************************************************************************ #!/bin/bash # Scriptname: nosy echo -e "Are you happy? \c" read answer echo "$answer is the right response." echo -e "What is your full name? \c" read first middle last echo "Hello $first" echo -n "Where do you work? " read echo I guess $REPLY keeps you busy! #------------------------------------------------ read -p "Enter your job title: " echo "I thought you might be an $REPLY." echo -n "Who are your best friends? " read -a friends echo "Say hi to ${friends[2]}." ***************************************************************************** It is mostly the read command that does not work (e.g. the line 4: read answer does not capture the answer and line 5: echo "$answer...." does not print the answer supplied. I execute the script by issuing the following: bash nosy. Here is the version of bash reported by bash - version [deans@queen deans]$ bash -version GNU bash, version 2.04.12(1)-release (i586-mandrake-linux-gnu) Copyright 1999 Free Software Foundation, Inc. [deans@queen deans]$ Any ideas -- Dean Steichen Linux - Mandrake 7.1 Netscape Mail [EMAIL PROTECTED]
"David E.Fox" Here is the bash script I am having problems with...It was copied from the cdrom for "Linux Shells by Example". (The lines between the strings of ****.. are the script in question.) ************************************************************************ #!/bin/bash # Scriptname: nosy echo -e "Are you happy? \c" read answer echo "$answer is the right response." echo -e "What is your full name? \c" read first middle last echo "Hello $first" echo -n "Where do you work? " read echo I guess $REPLY keeps you busy! #------------------------------------------------ read -p "Enter your job title: " echo "I thought you might be an $REPLY." echo -n "Who are your best friends? " read -a friends echo "Say hi to ${friends[2]}." ***************************************************************************** It is mostly the read command that does not work (e.g. the line 4: read answer does not capture the answer and line 5: echo "$answer...." does not print the answer supplied. I execute the script by issuing the following: bash nosy. Here is the version of bash reported by bash - version [deans@queen deans]$ bash -version GNU bash, version 2.04.12(1)-release (i586-mandrake-linux-gnu) Copyright 1999 Free Software Foundation, Inc. [deans@queen deans]$ Any ideas -- Dean Steichen Linux - Mandrake 7.1 Netscape Mail [EMAIL PROTECTED]