From: moonhkt on 10 Jun 2010 21:26 Hi All When using indent program to reformat shell program as below. how to using cat << as normal ? k=1 if [ k != 0 ] ; then cat <<-EOF Hello World. EOF fi test_eof.ksh[2]: 0403-057 Syntax error at line 2 : `<' is not matched.
From: Kenny McCormack on 10 Jun 2010 21:42 In article <a613dd2b-e13d-4bfa-9778-749c561f9973(a)v12g2000prb.googlegroups.com>, moonhkt <moonhkt(a)gmail.com> wrote: >Hi All > >When using indent program to reformat shell program as below. how to >using cat << as normal ? > >k=1 >if [ k != 0 ] ; then > cat <<-EOF > Hello World. > EOF >fi > >test_eof.ksh[2]: 0403-057 Syntax error at line 2 : `<' is not matched. Replace the above with: echo "Hello World." -- Just for a change of pace, this sig is *not* an obscure reference to comp.lang.c...
From: Seebs on 10 Jun 2010 21:58 On 2010-06-11, moonhkt <moonhkt(a)gmail.com> wrote: > When using indent program to reformat shell program as below. how to > using cat << as normal ? Don't use a indent to reformat a shell program. Indent is a tool for formatting C code. It does not support shell particularly well, in any of the versions I've used. <<- strips tabs, not all whitespace. -s -- Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam(a)seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
From: Ben Finney on 10 Jun 2010 22:59 gazelle(a)shell.xmission.com (Kenny McCormack) writes: > Replace the above with: > > echo "Hello World." Or, more portably: printf "Hello World.\n" -- \ Moriarty: “Forty thousand million billion dollars? That money | `\ must be worth a fortune!” —The Goon Show, _The Sale of | _o__) Manhattan_ | Ben Finney
From: Kenny McCormack on 10 Jun 2010 23:09
In article <87k4q65l6u.fsf(a)benfinney.id.au>, Ben Finney <ben+unix(a)benfinney.id.au> wrote: >gazelle(a)shell.xmission.com (Kenny McCormack) writes: > >> Replace the above with: >> >> echo "Hello World." > >Or, more portably: > > printf "Hello World.\n" Good point. -- > No, I haven't, that's why I'm asking questions. If you won't help me, > why don't you just go find your lost manhood elsewhere. CLC in a nutshell. |