On Thu, Apr 20, 2000 at 11:08:49PM -0400, Steven W. Orr wrote:
| =>> Can the following bash script "if" statement be shortened/condensed?
| =>> if [ "$MANS" = "y" ] || [ "$MANS" = "Y" ]
| => if [ $MANS = 'y' -o $MANS = 'Y' ]
| =>It's a bit shorter. I'm assuming that $MANS is a variable and if so you
| =>don't want the qoutes around it. Although ${MANS} would be correct.
|
| Sorry. Not legal bash syntax. Only valid if you use the external test
| program in /bin a la
If you means that -o, it's perfectly legal or bash is very very very broken.
But it would be .... unwise ... to drop the quotes.
--
Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/
Meddle not in the affairs of dragons,
for you are crunchy and good with ketchup.
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.