•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 456,442 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,610 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 1071 | Replies: 0
![]() |
•
•
Join Date: Aug 2007
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 0
Hi All,
Below is little bit of code, which i'm unable to run,
#!/bin/csh
echo answer = ""
echo " Please enter x to exit from script and anyother character to continue"
read answer
if ( "$answer" = "x" )
then
echo "Exiting from the $0 script, please the error log file."
$return_code = 0
exit $return_code
fi
It giving error as "answer: Undefined variable".
My login shell is "tcsh"
THanks in advance for your help.
Regards,
Arvind S.
Below is little bit of code, which i'm unable to run,
#!/bin/csh
echo answer = ""
echo " Please enter x to exit from script and anyother character to continue"
read answer
if ( "$answer" = "x" )
then
echo "Exiting from the $0 script, please the error log file."
$return_code = 0
exit $return_code
fi
It giving error as "answer: Undefined variable".
My login shell is "tcsh"
THanks in advance for your help.
Regards,
Arvind S.
![]() |
•
•
•
•
•
•
•
•
DaniWeb Shell Scripting Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Sending email from a shell script (Shell Scripting)
- Shell Script Issue (Shell Scripting)
- problem in using pppd in shell script (Shell Scripting)
- Linux Shell Script needs help writing program (Shell Scripting)
- Linux Shell Script (Shell Scripting)
- Using find in a bash shell script (Shell Scripting)
- How to su properly in a shell script (Shell Scripting)
Other Threads in the Shell Scripting Forum
- Previous Thread: value extracting using awk or sed
- Next Thread: How to write a function in csh / tcsh..?


Linear Mode