It is currently Sat, 30 May 2020 13:30:29 GMT



 
Author Message
 cat << EOF
Just curious what this command does? I see it in code
as :

cat << EOF >> file

Thanks.



 Sat, 29 Jan 2005 11:57:29 GMT   
 cat << EOF
Submitted by "Mankind" to comp.unix.shell:

It is often referred to as a "here-document".  The following
will put the three lines of text into a file called threelines:

cat > threelines <<EOT
line1
line2
line3
EOT

Search the manual of the shell for "here-document" or "here
document".

--
Andreas K?h?ri
--------------------------------------------------------------
Stable, secure, clean, free:  www.netbsd.org



 Sat, 29 Jan 2005 12:16:12 GMT   
 cat << EOF

{any command} << MARKER

means take everything from the next line to MARKER as stdin for the
command.

V.



 Sun, 30 Jan 2005 03:44:23 GMT   
 cat << EOF

news:1fgv28h.4sv7y8t28105N%eijkhout@cs.utk.edu...

    Thanks from the peanut gallery, Victor.  I've been
trying to get a handle on  "here documents"  from the
Advanced Shell Scripting  guide,  but was lost until I read the above.....

Bruce<+>



 Sun, 30 Jan 2005 08:37:35 GMT   
 cat << EOF
On Wed, 14 Aug 2002 00:37:35 GMT, Bruce Burhans <bburh...@earthlink.net>:

It's usually something like:

blah <<EOF
blah1
blah2
blah3
EOF

Meaning to take STDIN from the following lines up to "EOF".

--
Any technology distinguishable from magic is insufficiently advanced.
(*)  TopQuark Software & Services.  Contract programmer, server bum.
- -  Give up Spammers; I use procmail.      www.spots.ab.ca/~keeling
How to quote: http://learn.to/quote (Ger.) http://quote.6x.to (Eng.)



 Tue, 01 Feb 2005 09:30:39 GMT   
 cat << EOF

news:slrnaloleu.qfl.keeling@infidel.spots.ab.ca...

"Blah"  being an argument or option to the command?
Or piped input  or .....?

Bruce<+>

- Show quoted text -



 Tue, 01 Feb 2005 13:43:25 GMT   
 cat << EOF
Submitted by "Bruce Burhans" to comp.unix.shell:
[cut]

The first "blah" is the command, the "blah1", "blah2" and
"blah3" are three lines that will be sent to the STDIN of
"blah".

--
Andreas K?h?ri
--------------------------------------------------------------
Stable, secure, clean, free:  www.netbsd.org



 Tue, 01 Feb 2005 17:59:56 GMT   
 cat << EOF

Just make sure that there are no spaces/nulls after the EOF, otherwise
the script will keep going trying to find the 'EOF'.

--
Posted via http://dbforums.com



 Tue, 01 Feb 2005 20:24:06 GMT   
 cat << EOF

news:1705638.1029500646@dbforums.com...

        So THAT'S  why comments (#) *after*  the 'EOF'
were showing up!  I deleted to the end of the line after
the 'EOF'  and they went away.   Thanks...
        But spaces and comments (#)  *before* the 'EOF'
still show up in at least some here-documents....
        Not, apparently, in  'anonymous' ( : )  ones....

Bruce<+>



 Wed, 02 Feb 2005 04:13:11 GMT   
 
   [ 9 post ] 

Similar Threads

1. Slack 1.1.2: /etc/rc.d "cat << EOF" wierdness

2. How can I trap a user in script <-<-<-<-<-<-<-<-

3. <<<<<soundconfig problem <<<<<<<

4. I think I've found the rectum of the internet.<<<<<<<<<<<<

5. <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<?como?

6. C++ strings in i386<<FreeBSD<<C<<read()

7. IA32<<FreeBSD<<C++<<IPC

8. Question : : SOLARIS 2.3 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software