|
|
|
|
|
by Galanwe
1028 days ago
|
|
Neat, but both your tricks (rev and xargs) are more for getting the last word than getting the nth word. For the sake of the argument, say I have the following fixed output and want the sizes: $ ls -l
-rw-rw-r-- 1 userAAA group 588 Aug 29 00:25 file1
-rw-rw-r-- 1 userAA groupB 11870 Aug 29 00:24 file2
-rw-rw-r-- 1 userA groupBB 1166 Aug 28 23:56 file3
-rw-rw-r-- 1 user groupBBB 195 Aug 28 23:56 file4
I would just do: $ ls -l | awk '{print $5}'
|
|