Bash - IF Statement

2009-10-27 Thread briglass111
I am trying to write an IF Statement in Bash, but I am having issues. It doesn't like the following format: echo "yes or no?" read T if ["$T"="y"]; then echo "YES" fi .. It also doesn't like the following alternatives: if [$T="y"]; if ["$T"=="y"]; if [$T=="y"]; if "$T"="y";

Re: Bash - IF Statement

2009-10-27 Thread briglass111
my friend pointed out that the problem is that there needs to be extra spaces: [ "$T" = "y" ]; good job, bash briglass111 wrote: > > I am trying to write an IF Statement in Bash, but I am having issues. It > doesn't like the following format: > > ech

Re: Bash - IF Statement

2009-10-27 Thread briglass111
before i knew that bash was white-space picky, i thought this may be a cygwin issue because i read a bit about people saying bash is different in cygwin than in unix, and i got the if-statement code from a website about unix, and when it didn't run in cygwin's bash i figured it was a cygwin-specif

Re: Bash - IF Statement

2009-10-27 Thread briglass111
tour, and this small thread doesn't detract from this forum's large corpus. Larry Hall (Cygwin) wrote: > > <http://cygwin.com/acronyms/#TOFU>. Reformatted. > > On 10/27/2009 05:34 PM, briglass111 wrote: >> Andrew Schulman-3 wrote: >>> >>>&

Re: Bash - IF Statement

2009-10-28 Thread briglass111
What is wrong with you people? What is the desire to continue posting in this thread? I am a relatively inexperienced cygwin/unix user who had an honest question and you people got so chafed up by it. If you are so insulted or annoyed by my question, then find a mod or something and delete it, or