cat command | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

cat command

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-21-2006
surjyap surjyap is offline
Registered User
 
Join Date: Sep 2005
Last Activity: 23 September 2009, 5:16 AM EDT
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
cat command

What does the below command means

$cat <<% >abc.txt
Sponsored Links
    #2  
Old 03-22-2006
douknownam douknownam is offline
Registered User
 
Join Date: May 2004
Last Activity: 22 July 2011, 3:53 PM EDT
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
my understanding is that it cats % and outputs to abc.txt... assuming % is referencing some file.
Sponsored Links
    #3  
Old 03-22-2006
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 26 November 2014, 5:44 PM EST
Location: Foxborough, MA
Posts: 7,670
Thanks: 153
Thanked 586 Times in 551 Posts
Quote:
Originally Posted by douknownam
my understanding is that it cats % and outputs to abc.txt... assuming % is referencing some file.
and what about '<<'? what's that all about?
    #4  
Old 03-22-2006
reborg's Avatar
reborg reborg is offline Forum Advisor  
Administrator Emeritus
 
Join Date: Mar 2005
Last Activity: 29 March 2012, 7:00 PM EDT
Location: Ireland
Posts: 4,464
Thanks: 0
Thanked 11 Times in 11 Posts
Quote:
Originally Posted by surjyap
What does the below command means

$cat <<% >abc.txt
It's an incomplete 'here document'.

Search down the script in question until you find a line with a single % on it. Any text between the line you posted and the line with a % on it will end up in abc.txt
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
passing command output from one command to the next command in cshell kaaliakahn UNIX for Dummies Questions & Answers 2 02-10-2012 05:59 PM
unix command : how to insert text at the cursor location via command line? xib.be UNIX for Advanced & Expert Users 0 12-22-2010 06:45 PM
Need help! command working ok when executed in command line, but fails when run inside a script! 4dirk1 Shell Programming and Scripting 4 12-02-2010 06:47 AM
awk command in script gives error while same awk command at prompt runs fine: Why? catalys Shell Programming and Scripting 4 09-20-2010 11:07 PM
awk/sed Command : Parse parameter file / send the lines to the ksh export command rajan_san Shell Programming and Scripting 4 11-06-2008 01:29 PM



All times are GMT -4. The time now is 07:54 PM.