On Thursday 17 Sep 2009, steve wrote:
> [snip]
> Ummm, the literal space (" ") character doesn't work ? ...before
>  command3 (as in ") command3" or after command2 (as in "command2 ") ?

Not clear on what the OP wants, so no comment here.

> btw, what is a 'here' document ?

A here document is a shell construct by which you can simulate 
redirection from a file on the command-line.  For instance,  if you 
wanted to copy the following text to a floppy:

  This is the house that Jack built.
  This is the malt that lay in the house that Jack built.

you can put it into a file, say /tmp/file.txt, then:

  cat < /tmp/file.txt > /dev/fd0

If you want to avoid the intermediate step of creating file.txt, you can 
use a here document with the content you want:

  cat > /dev/fd0 <<some_string
  This is the house that Jack built.
  This is the malt that lay in the house that Jack built.
  some_string

The effect is as if you had put the text between 
some_string...some_string in a file and redirected stdin from that file, 
except that no actual file is created.  Convenient for quick-and-dirty 
texts, specially stuff you copy-paste from some application.

Regards,

-- Raju
-- 
Raj Mathur                [email protected]      http://kandalaya.org/
       GPG: 78D4 FC67 367F 40E2 0DD5  0FEF C968 D0EF CC68 D17F
PsyTrance & Chill: http://schizoid.in/   ||   It is the mind that moves
-- 
http://mm.glug-bom.org/mailman/listinfo/linuxers

Reply via email to