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

Re: exim and printer answers



* paul (ptay1253@yahoo.com) [020228 17:22]:
> Thanks
> 
> the cat command works when the end is EOF
> and does not work with << EOF  or < EOF
> I haven't the slightest clue on why but can't argue
> with success.

When you say something like "<< EOF" to your shell, it's called a
"here-document". You tell it to take input from a sort of virtual file
that you create on-the-fly, or inline. the basic concept is you tell it
"<<" and some label, in our case "EOF", and then it starts reading into
this virtual file. It knows the file is done and you're back to giving
it shell commands when you give it a line *starting* with the label you
gave after the "<<", in our case, "EOF". So in Carel's first command,
where the last line was "<< EOF", the shell wasn't aware you were done
giving it test input yet, and was still waiting (you must have hit ^D or
^C or something to get out of it). It was still waiting for a line
starting with "EOF", with nothing, even a "<<" in front of it.

good times,
Vineet

-- 
Currently seeking opportunities in the SF Bay Area
Please see http://www.doorstop.net/resume/

Attachment: pgp50L2JEXt1b.pgp
Description: PGP signature


Reply to: