The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Creating an sql statement from a file. Problem with ' hannem Shell Programming and Scripting 2 04-24-2008 09:26 AM
Problem while creating "trailer" lokiman Shell Programming and Scripting 6 02-12-2008 12:31 PM
Problem with creating big files eliraza6 Linux 6 11-06-2007 09:54 AM
Problem creating files greater than 2GB bobbyjohnz UNIX for Advanced & Expert Users 1 01-17-2007 12:19 PM
problem in creating executable for a client program konas High Level Programming 2 11-17-2006 02:09 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-04-2008
mmunir mmunir is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 18
EOF creating problem

In shell file, i am writing following statement:

cat > File1.sh <<EOF

set feedback off
set serveroutput on

cat > File2.sh <<EOF
contents of second file
EOF
Contents of First file

EOF

Actually, i want these bolded statements in File1.sh as it.

But after first EOF, contents are not written in Firle1.sh any more.

Is there any solution ?
  #2 (permalink)  
Old 07-04-2008
chella chella is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 75
Hi,

Since you have two labels(here document), both named as EOF it will create some problem. Try the below,


Code:
cat > File1.sh <<EOA

set feedback off
set serveroutput on

cat > File2.sh <<EOF
contents of second file
EOF
Contents of First file

EOA

I don't really understand your actual scenario. I hope the above may help.

Regards,
Chella
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:06 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0