Re: Bash, cat and EOF problem

2006-03-01 Thread LUK ShunTim
Dave Thayer wrote: > On Thu, Mar 02, 2006 at 02:41:08PM +0800, LUK ShunTim wrote: > > >> >>cat <>outfile >>Some words >>EOF >> >> >>works but when it is embedded inside an if-then-fi construct like, >> >> >>AAA="" >>if [ -z "$AAA" ]; then >> cat <>outfile >> Some words >> EOF >>fi >> >> >>i

Re: Bash, cat and EOF problem

2006-03-01 Thread Dave Thayer
On Thu, Mar 02, 2006 at 02:41:08PM +0800, LUK ShunTim wrote: > > cat <>outfile > Some words > EOF > > > works but when it is embedded inside an if-then-fi construct like, > > > AAA="" > if [ -z "$AAA" ]; then >cat <>outfile >Some words >EOF > fi > > > it fails with error message

Re: Bash, cat and EOF problem

2006-03-01 Thread Andrew Cady
On Thu, Mar 02, 2006 at 02:41:08PM +0800, LUK ShunTim wrote: > if [ -z "$AAA" ]; then >cat <>outfile >EOF > fi Remove indentation before EOF or use <<" EOF". -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Bash, cat and EOF problem

2006-03-01 Thread LUK ShunTim
Hello, I ran into this problem which I cannot figure out. I must have missed something. I'm using sid with bash version 3.1.5(1). cat <>outfile Some words EOF works but when it is embedded inside an if-then-fi construct like, AAA="" if [ -z "$AAA" ]; then cat <>outfile Some words EO