awk from end of string -3 position comparison
Hi, I would like to check if the 3rd character from the end of a string is a d or p using awk and the field seperator would not help for this problem, i.e.
Code:
zgcdedgh |
Why not use a regular expression like /d..$/ or /p..$/ ?
--b9 |
Code:
# awk -vFS= '$(NF-2) ~ /[dp]/' file |
Code:
$ ruby -ne 'print if $_.chomp[-3][/[dp]/]' myfile |
Tanks
Tanks Tanks |
All times are GMT -5. The time now is 08:23 AM. |