Hello everybody,
how can I get the last column in a raw in a variable record length row?
Example
1237894b2376q2786ho8
21374y723dno
1237d8923717234 85710d5d1n
result
8
o
n
Regards
Dario
Search last column in a row
Moderator: DosItHelp
Re: Search last column in a row
echo %var:~-1%
Read set/? for details
Read set/? for details
-
- Posts: 319
- Joined: 12 May 2006 01:13
Re: Search last column in a row
you can use gawk
Code: Select all
gawk -vFS= "{print $(NF)}" file