> Do 'if' and "case" statements need to be run as part of a shell script
> or can they be run from the shell command line prompt?
Anything in a script can be done at the prompt. When you run a script,
it's the same shell, it's just reading the commands from the file
instead of a terminal.
--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
> Do 'if' and "case" statements need to be run as part of a shell script
> or can they be run from the shell command line prompt?
If you want to have a multi-line command at the prompt place it in quotes.
I've only done that under bash though to your mileage may vary.
> Do 'if' and "case" statements need to be run as part of a shell script
> or can they be run from the shell command line prompt?
Anything you can put in a script can be done from the shell prompt, it's
the same shell.
s/to/so/