[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Edlug Archive Nov 2009 ]

Re: [edlug] Shell Script Problem

<  Which I would like to compress into a single line to clarify the
<  script.  How would I achieve this...?

if [ "$result" = "D" ]; then session=dellgx280 ; fi

will also work if you want clarity. Note the ';' after each statement 
in the if ... fi.

I also think you want '=' rather than '==' for the test, at least that's what 
my 'man test' says.

David McKelvie    Interactive Information Ltd,          Registered in Scotland
07808 492268      3, Lauriston Gardens,                  Company no. SC 150689
0131 229 1052     Edinburgh EH3 9HH
                  SCOTLAND UK             Interactions speak louder than words

You can find the EdLUG mailing list FAQ list at:

This archive is kept by wibble+RM@xxx.xxx.xxx