Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

cat command

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 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 Unix and Linux 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 Unix and Linux 03-22-2006
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 23 May 2015, 2:02 AM EDT
Location: Foxborough, MA
Posts: 7,822
Thanks: 174
Thanked 652 Times in 610 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 Unix and Linux 03-22-2006
reborg's Unix or Linux Image
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 Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 04: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 05: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 05: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 10: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 12:29 PM



All times are GMT -4. The time now is 03:16 AM.