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
shell script to insert data from gps.txt to mysql database gudivada213 Shell Programming and Scripting 1 06-23-2009 02:05 PM
Insert variable into text file using shell script badbunny9316 Shell Programming and Scripting 3 05-18-2009 06:07 AM
Insert C code in shell script badbunny9316 Shell Programming and Scripting 1 05-14-2009 03:55 AM
Unix Shell Script: With Menu Option jroberson Shell Programming and Scripting 11 08-26-2008 07:04 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM

Reply
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 06-23-2009
sanjay1979 sanjay1979 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 36
sed insert option(-i) in shell script

Hi,

Please tell me how to use insert option of sed in a shell script on Solaris/AIX plateform.

For example I need to insert few lines on top of every file whose name starts with say "SOL_DEL".

Thanx.
  #2 (permalink)  
Old 06-24-2009
Gee-Money Gee-Money is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 48
Insert is not "-i". It's just "i". Do not confuse sed "commands" with command line options. The command line option "-i" means to edit the file in place (dangerous!) in most sed versions that have the -i option, so watch out.

If you google "sed", go to the very first page, and as you will see, it is the #1 sed page on the webs. There is an example for every single sed command, including insert.
  #3 (permalink)  
Old 07-02-2009
sanjay1979 sanjay1979 is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 36
Thanks GEEMonery.
Reply

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 03:40 PM.


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