Bash Problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Did you mean "for i in..." rather than "for in..."?
don't know why that would cause that particular error, but it looks wrong to 
leave out the i.
--le

----- Original Message ----- 
From: "Janina Sajka" <janina@xxxxxxxxxxx>
To: <ma-linux at tux.org>; <speakup at braille.uwo.ca>; 
<blinux-list-bounces at redhat.com>
Sent: Thursday, April 28, 2005 10:03 AM
Subject: Bash Problem


I'm confused over some simple bash syntax. If I write the following at
the bash (ver 3.0) prompt, all works as expected--no errors.

But, if I execute from a script file (which begins with a #!/bin/bash of
course), I get:

line 4: syntax error near unexpected token `then'

What am I missing? All help much appreciated.


for in $( ls); do
if [ "$i" != "incoming/" ]; then
echo $i
fi
done


-- 

Janina Sajka Phone: +1.202.494.7040
Partner, Capital Accessibility LLC http://www.CapitalAccessibility.Com

Chair, Accessibility Workgroup Free Standards Group (FSG)
janina at freestandards.org http://a11y.org

If Linux can't solve your computing problem, you need a different problem.


_______________________________________________
Speakup mailing list
Speakup at braille.uwo.ca
http://speech.braille.uwo.ca/mailman/listinfo/speakup 





[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux