Conversation
Notices
-
lnxw48a1 (lnxw48a1@nu.federati.net)'s status on Friday, 19-Jan-2024 15:17:37 EST lnxw48a1 Learning to use cut and thinking that it is so simple-minded that I wouldn't ever use it instead of awk.
Example:
ls -lF | cut -d " " -f 1,3,4,9 gives inconsistent results. I suspect ls is sometimes using multiple spaces between fields. ls -lF | cut -d \t -f 1,3,4,9 also fails to give useful results.
Compare that to ls -lF | awk '{ print $1, $3, $4, $9 }' which gives me exactly what I was looking for.