Search Results

Search: Posts Made By: Patagonicus
15,612
Posted By Patagonicus
I think he wants the third column, not the third...
I think he wants the third column, not the third row, so $3 is right, but the third column has spaces in it. You can use this:
awk '{ sub("^[^ ]* [^ ]* ", "") ; sub(" [^ ]*$", "") ; print }'
The...
10,807
Posted By Patagonicus
Hi, this command prints the line number, a...
Hi,

this command prints the line number, a colon, a space and the last two characters for each line:
awk '{ print NR ": " substr($0, length($0)-1) }' test.txt
Showing results 1 to 2 of 2

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