How do i compare 2 strings in shell?
Posted
by Thomas
on Stack Overflow
See other posts from Stack Overflow
or by Thomas
Published on 2010-05-23T01:54:01Z
Indexed on
2010/05/23
2:00 UTC
Read the original article
Hit count: 334
I want the user to input something at the command line either -l or -e. so e.g. $./report.sh -e I want an if statement to split up whatever decision they make so i have tried...
if [$1=="-e"]; echo "-e"; else; echo "-l"; fi
obviously doesn't work though Thanks
© Stack Overflow or respective owner