Search Results

Search: Posts Made By: miltonrods
1,755
Posted By Don Cragun
I've never heard of a gwak command??? If you...
I've never heard of a gwak command??? If you mean awk or gawk (or on Solaris/SunOS systems nawk or /usr/xpg4/bin/awk), try:
echo 123456_BLA_BLA | awk '{print substr($0, 1, 6)}'
but, this could be...
1,421
Posted By jim mcnamara
You want to find lines with -nnn at the end of...
You want to find lines with -nnn at the end of the line?


grep '-[0-9]+$' somefile


Or do you want only those exact patterns?

grep -e '-55$' -e '-44$' -e '-6$' somefile
1,421
Posted By bartus11
awk -F"-" '{print $NF}' file
awk -F"-" '{print $NF}' file
1,421
Posted By Corona688
grep matches lines. how about awk? awk...
grep matches lines.

how about awk?

awk -F- '{ print $NF }' filename
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 01:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy