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 > 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
comment/delete a particular pattern starting from second line of the matching pattern imas Shell Programming and Scripting 4 10-13-2008 02:37 AM
Sed and replacing one occurence of pattern ss9u Shell Programming and Scripting 6 07-16-2008 02:06 PM
replacing a pattern in a file ROOZ Shell Programming and Scripting 6 06-11-2008 12:04 PM
Replacing more than 1 pattern in a line Manan Shell Programming and Scripting 6 12-28-2006 01:58 AM
Replacing pattern in variable videsh77 Shell Programming and Scripting 1 05-26-2005 02:11 PM

 
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 10-16-2008
dixitked dixitked is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 2
while replacing the pattern last line is last

I am using sed command to replace the pattern, i am replacing value of variable x with value of nw for a file temp2.

/usr/bin/sed 's|'$x'|'$nw'|' temp2 > $file

After running it my last line is getting lost.
What can be reason of this?
 

Bookmarks

Tags
last line lost, replace, sed

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