Newsgroups: gnu.bash.bug Path: utzoo!utgpu!radio.astro!brian From: brian@radio.astro.utoronto.ca (Brian Glendenning) Subject: Bash functions incompatibility with sh? Message-ID: Sender: brian@radio.astro.utoronto.ca (Brian Glendenning) Organization: Radio Astronomy, Univeristy of Toronto Distribution: gnu Date: Mon, 26 Jun 89 20:10:03 GMT The following may not be a bug, it may be due to my not understanding shell functions properly. It does, however, seem to be at least an incompatibility with sh (the one on SunOS 4.0.1 anyway), and I would also appreciate knowing the correct way to do this type of thing if I'm mishandling the syntax. Under sh if I type: c() { for i in a b c d; do echo $i; done ; } then "c" does what I expect (i.e. echoes a b c d each on a new line). However under bash exactly the same line gives me: syntax error near `do' So, I'd like to report this incompatibility, and ask for the correct syntax for getting "for" "while" "if" and friends into bash shell functions. Thanks. -- Brian Glendenning - Radio astronomy, University of Toronto brian@radio.astro.utoronto.ca uunet!utai!radio!brian glendenn@utorphys.bitnet -- Brian Glendenning - Radio astronomy, University of Toronto brian@radio.astro.utoronto.ca uunet!utai!radio!brian glendenn@utorphys.bitnet