The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
if then else structure
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
if then else structure
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
12-27-2003
props
Registered User
Join Date: Oct 2003
Location: uk
Posts: 15
if then else structure
echo name the file that you want to read
read answer
if [ $# = 0 ]
then
echo you must enter a file name
fi
cat $answer
im trying to catch the error if user forget to enter the name of the file
anyone can help me ?
thanks
Remove advertisements
Forum Sponsor
props
View Public Profile
Find all posts by props