Results 1 to 1 of 1
How would I kill my bash script if the user doesn't add anything on their prompt but just hits enter?
Would I use if or case? I'm not quite sure ...
- 04-01-2010 #1Just Joined!
- Join Date
- Apr 2010
- Posts
- 1
No input ends bash script
How would I kill my bash script if the user doesn't add anything on their prompt but just hits enter?
Would I use if or case? I'm not quite sure how I would go about it since the field is empty and I have no idea how to define empty.
Edit:
I was finally able to google my way to the answer.
It worked with"
if [ -z $string ]


Reply With Quote