The UNIX and Linux Forums  


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



UNIX Desktop for Dummies Questions & Answers Discuss UNIX and Linux user interfaces like GNOME, KDE, CDE, and Open Office here. All UNIX and Linux Newbies Welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Issue with Sed Command raghav1982 Shell Programming and Scripting 6 06-22-2009 04:46 PM
WC command Issue mraghunandanan UNIX for Dummies Questions & Answers 5 05-28-2009 10:29 AM
cp command issue. sai_nj UNIX for Dummies Questions & Answers 4 06-12-2007 01:15 PM
Tar command issue ajayyadavmca HP-UX 2 05-02-2007 11:42 AM
AIX 5.3 - Issue with using at command vigsgb AIX 2 08-03-2005 09:43 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 07-24-2009
kavithakuttyk kavithakuttyk is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 17
Issue with sed command

Hi,

I have to replace the character AL2 with AL16 which I have in one of my text file .
I used the sed command like this
sed 's/sed 's/AL2/AL16/g' test_carr.dat>test_carr1.dat

But it is not replacing this value to the output file.
The test_carr.dat file contains data like this
cat test_carr.dat
AL2.mac_cd LIKE '%4M%' OR AL2.mac_cd LIKE '%CM%' OR AL2.mac_cd LIKE '%FJ%' OR AL2.mac_cd LIKE '%IR%' OR AL2.mac_cd LIKE '%KU%' OR AL2.mac_cd LIKE '%OM%' OR AL2.mac_cd LIKE '%PG%'
Could you please help me to resolve this.?
  #2 (permalink)  
Old 07-24-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,800

Code:
sed 's/sed 's/AL2/AL16/g' test_carr.dat>test_carr1.dat
# should be:
sed 's/AL2\./AL16\./g' test_carr.dat>test_carr1.dat

to start with.
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 04:19 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