print command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting print command
# 1  
Old 11-17-2009
print command

Is there a way in the Korn Shell to print like below:

print "the red fox jumped \
<6 spaces> over the brown house.\n" > test.out


And have the output look like the folowing:

the red fox jumped over the brown house.



Our shell scripting standards state that no line can be over 78 characters
and a continued line must be indented 6 spaces. So I have to continue the line and indent on print statements. But I don't want the line to look like below:

the red fox jumped<6 spaces> over the brown house.

the <6 spaces> are actually 6 spaces not the literal. The Preview Post is taking away the spaces from my text.



thanks.
# 2  
Old 11-17-2009
Try:
Code:
print "The quick brown fox" \
       "jumped over the lazy dog"\
       "while Mary had a little lamb"\
       "whose fleece was white as snow."

# 3  
Old 11-17-2009
That did it.


Thanks!!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Tree command does not print properly

Hi, when I run tree command in linux box getting below image, not the line test âââ lost+found âââ test1 â  âââ aaa.txt â  âââ bbb.txt âââ test2 3 directories, 2 files installed tree-1.5.3-2.el6.x86_64 package (8 Replies)
Discussion started by: stew
8 Replies

2. Shell Programming and Scripting

Print command issue

Hi, OS - Linux Print command is working in some scripts and not working in some other scripts. We migrated the scripts from HP UX to Linux. Default shell - korn By using printf it working. But why these difference? Thanks (6 Replies)
Discussion started by: nag_sathi
6 Replies

3. Shell Programming and Scripting

Not able Print next command

Hi All, I'm wrting one script which checks health of the server.But couldn't understand why script is not printing any value for this also its not allowing to print other command just after this. ps -aef |egrep -i "fcm|comm" (1 Reply)
Discussion started by: netdbaind
1 Replies

4. Shell Programming and Scripting

print command in awk

Hi can print command in awk take the variable and write its value in the file? Excerpt from my shell script. for some reason, $proc is being written in the file instead of its value. can someone tell me what is the issue? for proc in EH LOGEV do echo $proc ./plist -P $proc |... (2 Replies)
Discussion started by: lookinginfo
2 Replies

5. Shell Programming and Scripting

How to check status of last print command?

I am working on an Linux based application where I am using lp -onobanner -s -d$RPTDEST command to print the file on desired printer. Variable $RPTDEST could be different each time even for the same user. I need to implent the check if last print command was succesful or not, so that application... (3 Replies)
Discussion started by: dpmore
3 Replies

6. UNIX for Dummies Questions & Answers

print: command not found

Hi I have print Apple >> /tmp/temp7.xls as part of my shell script. But when I execute I have the following error. Please help. RT.sh: line 801: print: command not found (5 Replies)
Discussion started by: pk_eee
5 Replies

7. UNIX for Dummies Questions & Answers

What command do you use to clear the print que?

Hi, I have a user that has tried to print a job several times and has now filled up the que. How do i delete all the jobs in the que and what is the command?:confused: (1 Reply)
Discussion started by: nov_user
1 Replies

8. Shell Programming and Scripting

Problem with print command

Hi, I have a small script and am having problem at one point. The script runs another script called Run_SQL.sh. All I am trying to do is if the return code from the script is not zero(0) then display some message(which is working fine) and if the return code is zero then run the SED command and... (2 Replies)
Discussion started by: rkumar28
2 Replies

9. UNIX for Dummies Questions & Answers

perl print command

Hi, I am running this command in perl print "this is a test message @1.00 pm\n" but the output i am getting as this is a test message .00 pm pls help, how to get the proper output (2 Replies)
Discussion started by: vasikaran
2 Replies

10. Shell Programming and Scripting

Print command in linux

What is the equivalent of print for linux scripts? I've scripted in unix, but went to try and do a script in linux, red hat 6.2, and it said print command not found. i.e.: print 'Enter answer' read answer . . . etc. (2 Replies)
Discussion started by: kymberm
2 Replies
Login or Register to Ask a Question