|
|||||||
| 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
|
|||
|
|||
|
Display/Cut the characters based on match
I have input file like this Code:
update tablename set column1='ABC',column2='BBC' where columnx=1 and columny=100 and columnz='10000001' update tablename set column1='ABC',column2='BBC',column3='CBC' where columnx=1 and columny=100 and columnz='10000002' update tablename set column1='ABC' where columnx=1 and columny=100 and columnz='10000003' update tablename set column1='ABC',column2='BBC',column3='EBC',column4='GBC' where columnx=1 and columny=100 and columnz='10000004' update tablename set column1='ABC',column2='BBC',column3='FBC' where columnx=1 and columny=100 and columnz='10000005' I need like this Code:
10000001 10000002 10000003 10000004 10000005 Code:
My shell is csh |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Code:
awk -F\' ' { print $(NF-1) } ' file |
| The Following User Says Thank You to anbu23 For This Useful Post: | ||
nsuresh316 (03-03-2013) | ||
| 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 |
| Display n lines before match found | nsuresh316 | UNIX for Dummies Questions & Answers | 3 | 06-25-2012 09:04 AM |
| awk display the match and 2 lines after the match is found. | eurouno | UNIX for Dummies Questions & Answers | 4 | 02-03-2012 08:16 PM |
| Cut last 7 characters of a variable | kblawson14 | Shell Programming and Scripting | 5 | 12-16-2010 03:53 PM |
| Cut the last 15 characters off | svajhala | Shell Programming and Scripting | 5 | 09-01-2010 01:36 AM |
| regex - display all occurrences of match | danmauer | UNIX for Dummies Questions & Answers | 18 | 02-17-2009 10:53 AM |
|
|