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
to append data in a single row Sgiri1 Shell Programming and Scripting 8 05-05-2009 04:48 AM
How to Append the specific data to the xml file ravi_rn Shell Programming and Scripting 2 04-03-2009 03:01 AM
append data to file fletcher UNIX for Dummies Questions & Answers 1 02-07-2009 07:08 AM
Using awk (or whatever) to pull and append data in a new file Milano_EH3 UNIX for Dummies Questions & Answers 6 01-27-2009 05:10 PM
append data in a file by using tab delimiter Sharmila_P Shell Programming and Scripting 6 07-31-2008 02:07 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 06-02-2009
ravi_rn ravi_rn is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 19
Append the data to first column

Hi,

The below is the content of the file.

008.03.50.21|ID4|0015a3f01cf3
008.04.20.16|ID3|0015a3f02337
008.04.20.17|ID4_1xVoice|00131180d80e
008.04.20.03|ID3_1xVoice|0015a3694125
008.04.30.05|ID3_1xVoice|0015a3f038af
008.06.30.17|ID3_1xVoice|00159660d454
009.05.70.04|ID3_1xVoice|0015a3ea814b
009.05.70.12|ID3_1xVoice|0015a36922f9
013.01.50.09|Service|0015a2d82070

I need to append "_1" to the first column only. The output should look like

008.03.50.21_1|ID4|0015a3f01cf3
008.04.20.16_1|ID3|0015a3f02337
008.04.20.17_1|ID4_1xVoice|00131180d80e
008.04.20.03_1|ID3_1xVoice|0015a3694125
008.04.30.05_1|ID3_1xVoice|0015a3f038af
008.06.30.17_1|ID3_1xVoice|00159660d454
009.05.70.04_1|ID3_1xVoice|0015a3ea814b
009.05.70.12_1|ID3_1xVoice|0015a36922f9
013.01.50.09_1|Service|0015a2d82070

please help me in writing regular expression in unix.

Thanks in advance for helping in solving the above issue.
 

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 07:44 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