![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Awking | anduzzi | Shell Programming and Scripting | 3 | 02-09-2009 01:37 PM |
| awking and grepping parts of files: the 'super diff' | jeffpas | Shell Programming and Scripting | 11 | 07-17-2008 06:54 PM |
| Awking!! Printing decimal output is struck | divzz | Shell Programming and Scripting | 4 | 05-28-2008 08:02 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help with awking
Hi...
How does awk or sed or even grep extract the following string out of my text file?. '"${ETL_VW_SCHEMA}"'.IATA_STN_TZ_UTC_LCL_CONV_CV '"${ETL_VW_SCHEMA}"'.CO '"${ETL_VW_SCHEMA}"'.TEST_CO I just need to extract the second entry which means I need to let awk know I am just searching for CO and not any combinations(like TEST_CO and IATA_STN_TZ_UTC_LCL_CONV_CV) and with the occurence of ETL_VW_SCHEMA...so, basically I need to search for '"${ETL_VW_SCHEMA}"'.CO For some reason my awk doesn't recognize the period(.) in my search pattern. Thx ! |
|
||||
|
Thanks for the reply !
I am on Solaris and these commands quite not working as expected. Code:
bash-2.03$ egrep ''"${ETL_VW_SCHEMA}"'.CO' my.dat
'"${ETL_VW_SCHEMA}"'.IATA_STN_TZ_UTC_LCL_CONV_CV
'"${ETL_VW_SCHEMA}"'.CO
'"${ETL_VW_SCHEMA}"'.TEST_CO
Code:
bash-2.03$ nawk '/'"${ETL_VW_SCHEMA}"'.CO/' my.dat
'"${ETL_VW_SCHEMA}"'.IATA_STN_TZ_UTC_LCL_CONV_CV
'"${ETL_VW_SCHEMA}"'.CO
'"${ETL_VW_SCHEMA}"'.TEST_CO
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|