You're viewing a comment by Sydney and its responses.
You're viewing a comment by Sydney and its responses.
I am being sponsored by Syntress! They bought me an amazing dedicated server to run catonmat on. If you're looking web services, I highly recommend the Syntress guys!
I am being sponsored by A-Writer! If you ever need help with essay writing, look no further than A-Writer! They will help you with your writing in as quickly as 3 hours!
I love to read science books. They make my day and I get ideas for awesome blog posts, such as Busy Beaver, On Functors, Recursive Regular Expressions and many others.
Take a look at my
Amazon wish list, if you're curious about what I have planned reading next, and want to surprise me. :)
If you are interested in advertising on catonmat.net, contact me.
Free tools for coding on Vietstarsoft.com.
Programming homework help.


Thanks so much Peteris,
I am only ever using GNU AWK on Redhat or Ubuntu maybe Debian rarely. So I mutated the first into:
df -h | awk '/\// { if (strtonum($(NF-1)) >= 20) { print $NF ": " $(NF-1) } }'I am guessing that strtonum function that you suggested takes it out of the string world. I was trying to compare a string to a number.
The RegEx /\// found all mounts.
df output is not constant in Red Hat with long mount names
Who knew? So I changed the code to work backwards from the last field.
Thanks a bunch this was an interesting experiment for me that I may turn around and tweak for production.
Comment Responses
Hi,
Please let me know the command to list files having specific number of rows. I want to list all the files having only 3 rows only.
Regards,
Reply To This Comment