Re: Shorten Bash Script

2000-04-21 Thread rpjday
On Fri, 21 Apr 2000, rpjday wrote: > On Thu, 20 Apr 2000, Steven W. Orr wrote: > > > Not legal bashsyntax unless you're testing for a filename to be globbed. sometimes, i can be pretty clueless. since the original poster was asking how to recognize a variable being equal to either "Y" or "y",

Re: Shorten Bash Script

2000-04-21 Thread rpjday
On Thu, 20 Apr 2000, Steven W. Orr wrote: > Not legal bashsyntax unless you're testing for a filename to be globbed. > > -- > -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED] > -Stranger things have happened but none stranger than this. Steven W. Orr- > Does your driver'

Re: [RedHat-List] Re: Shorten Bash Script

2000-04-20 Thread Cameron Simpson
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 i

Re: Shorten Bash Script

2000-04-20 Thread Steven W. Orr
Sorry. Not legal bash syntax. Only valid if you use the external test program in /bin a la if /bin/test ... -- -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED] -Stranger things have happened but none stranger than this. Steven W. Orr- Does your driver's license say Organ

Re: Shorten Bash Script

2000-04-20 Thread Steven W. Orr
Not legal bashsyntax unless you're testing for a filename to be globbed. -- -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED] -Stranger things have happened but none stranger than this. Steven W. Orr- Does your driver's license say Organ Donor?Black holes are where God \ --

Re: Shorten Bash Script

2000-04-20 Thread Steven W. Orr
The answer is yes. :^) if [ "$MANS" = y ] || [ "$MANS" = Y ] Not the answer you're looking for, but the constant has no interpolation and so does not even need to be quoted. -- -Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED] -Stranger things have happened but none s

Re: Shorten Bash Script

2000-04-20 Thread Steve Feehan
On Wed, 19 Apr 2000, SoloCDM wrote: > Can the following bash script "if" statement be shortened/condensed? > > if [ "$MANS" = "y" ] || [ "$MANS" = "Y" ] > > * > Signed, > SoloCDM > if [ $MANS = 'y' -o $MANS = 'Y' ] It

Re: Shorten Bash Script

2000-04-20 Thread Michael Elkins
On Wed, Apr 19, 2000 at 04:21:30PM -0600, SoloCDM wrote: > Can the following bash script "if" statement be shortened/condensed? > > if [ "$MANS" = "y" ] || [ "$MANS" = "Y" ] if [ "$MANS" = y -o "$MANS" = Y ] man test for the syntax for the comparison functions. me -- To unsubscribe: ma

Re: Shorten Bash Script

2000-04-20 Thread rpjday
On Wed, 19 Apr 2000, SoloCDM wrote: > Can the following bash script "if" statement be shortened/condensed? > > if [ "$MANS" = "y" ] || [ "$MANS" = "Y" ] [ $ANS = [Yy] ] or if you want to check if the response just STARTS with Y or y, [ $ANS = [Yy]* ] rday -- To unsubscribe: mail [EM

Shorten Bash Script

2000-04-20 Thread SoloCDM
Can the following bash script "if" statement be shortened/condensed? if [ "$MANS" = "y" ] || [ "$MANS" = "Y" ] * Signed, SoloCDM -- To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject.