The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
replace multiple lines in multiple files unihp1 Shell Programming and Scripting 1 09-21-2008 08:47 AM
retrieved multiple lines on multiple places in a file dala Shell Programming and Scripting 8 03-14-2008 03:28 PM
using sed command to delete a string spanning multiple lines radha.kalivar Shell Programming and Scripting 9 07-25-2007 10:26 AM
using sed command to replace multiple lines radha.kalivar Shell Programming and Scripting 1 07-10-2007 10:36 AM
How to run awk command having multiple lines nani_g Shell Programming and Scripting 0 06-09-2006 02:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-25-2008
tuathan tuathan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 10
Sed command over multiple lines in csh??

hi i have a long sed command in a csh script that won't fit on 1 line.
how do i break it up correctly over multiple lines?

this doesn't seem to work in csh:

sed -e s/template/$IP.$NN/ \
-e s/NRG/6/ \
-e s/inputf/$IS.$NN/ \
-e s/SHIFT/10.0/ <template.egsinp > $IP.$NN.inp

i get:

sed: can't read : No such file or directory
./script1.sh: line 48: -e: command not found


many thanks for your help
  #2 (permalink)  
Old 11-25-2008
tuathan tuathan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 10
i got this to work:

#!/bin/sh -f
rm -f sedtest.out
touch sedtest.out
sed -e s/s/S/ \
-e s/e/E/ \
-e s/d/D/ \
-e s/t/T/ \
-e s/e/E/ \
-e s/s/S/ \
-e s/t/T/ <sedtest.inp > sedtest.out
exit


including the -f flag
Sponsored Links
Closed Thread

Bookmarks

Tags
sed csh

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 12:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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