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
AWK optimization majormark Shell Programming and Scripting 2 06-02-2009 12:10 PM
unix script optimization max_payne1234 UNIX for Dummies Questions & Answers 3 04-06-2009 09:58 AM
script optimization vivek.gkp Shell Programming and Scripting 3 11-06-2008 05:37 AM
On Premature Optimization iBot Complex Event Processing RSS News 0 02-12-2008 05:20 AM
Help on optimization of the script aju_kup UNIX for Dummies Questions & Answers 2 11-20-2007 02:21 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-15-2009
njaiswal njaiswal is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 1
sed optimization

I have a process using the following series of sed commands that works pretty well.
sed -e 1,1d $file |sed 1i\\"EHLO Broadridge.com" |sed 2i\\"MAIL FROM:${eaddr[0]}"|sed 3i\\"RCPT TO:${eaddr[1]}"|sed 4i\\"DATA"|sed 5s/.FROM/FROM:/|sed 6s/.TO/TO:/|sed 7,7d|sed s/.ENDDATA/./|sed s/.ENDARRAY// >temp/$file

I now need this to run much faster... I'm thinking its pretty slow because I'm calling sed so many times; but I can't figure out how to get this to run in one instance of sed... help.

Thanks
Niten
 

Bookmarks

Tags
sed optimization

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 08:04 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