tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Bug in sh, and ksh,
@ 2001-02-28 10:01 Hannes Visagie
  0 siblings, 0 replies; only message in thread
From: Hannes Visagie @ 2001-02-28 10:01 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks to:
Robert Mulley
Gavin Kreuter

It is not a BUG. 

It is not a bug. ksh is looking for "EOF" to signal end to stdin. not "EOF
". Whitespace is important in this situation. It is the same as putting
"EOF.", whereas you may see the "." or " " as unimportant the shell
interprets the line as another command. 

-----Original Message-----
From: Hannes Visagie [mailto:visagi_h@mtn.co.ug]
Sent: Wednesday, 28 February, 2001 12:08 PM
To: tru64-unix-managers@ornl.gov
Subject: Bug in sh, and ksh, or not a bug ? << Shell Input. True65 5.1,
no patches
Importance: High


Hi all

Please confirm you can generate this bug, or is it not a bug.  According to
me it is a bug.

in the following example you start a << EOF and end EOF between a if/fi
statement.  All OK.
But now change to blablabla... <<EOF  
EOF_  {Replace the '_' to a normal space char}

Now run and script does not work. !!!
Take it out of if/fi and works again.

#-----snip ---
#!/usr/bin/ksh
TEST='abc'

if [ "$TEST" = "abc" ]; then
ftp -i -n 10.ip.ip.ip << EOF
user your_username your_password
ls
exit

EOF
#Add a space to above line after the EOF, script fails

fi
#---- end snip ----

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-02-28 10:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-28 10:01 Summary: Bug in sh, and ksh, Hannes Visagie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox