Conversation
Notices
-
LinuxWalt (@lnxw48a1) {3EB165E0-5BB1-45D2-9E7D-93B31821F864} (lnxw48a1@nu.federati.net)'s status on Friday, 19-Jan-2024 20:17:37 UTC LinuxWalt (@lnxw48a1) {3EB165E0-5BB1-45D2-9E7D-93B31821F864} 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.