|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Solved] Extract a pattern using sed or cut
Hi, Need help to extract a pattern using sed or cut or any other means. Input Code:
'name1',1234567890 'name2',2222222222 'name3',3333333333 Expected output Code:
name1,1234567890 name2,2222222222 name3,3333333333 |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
extract? Just delete the quotes: Code:
tr -d \' < file |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
Code:
sed 's/'\''//g' filename Code:
awk '{gsub(/'\''/,"")}1' filename |
|
#4
|
||||
|
||||
|
Thanks bipinajith,
That's what i was looking for... ![]()
Last edited by bakunin; 01-30-2013 at 05:53 PM.. |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sed or awk, cut, to extract specific data from line | ocramas | Shell Programming and Scripting | 4 | 11-01-2012 12:17 AM |
| [Solved] deleting pattern based lines in sed | pandeesh | UNIX for Dummies Questions & Answers | 0 | 12-03-2011 04:25 AM |
| [solved] remove pattern with sed | a27wang | Shell Programming and Scripting | 8 | 09-17-2010 01:17 PM |
| sed: Find start of pattern and extract text to end of line, including the pattern | TestTomas | Shell Programming and Scripting | 5 | 05-27-2009 11:16 AM |
| Please help! Sed extract a pattern | zhen | Shell Programming and Scripting | 11 | 09-18-2006 12:36 PM |
|
|