How to join two command output
- by UAdapter
for example I have command that shows how much space folder takes
du folder | sort -n
it works great, however I would like to have human readable form
du -h folder
however if I do that than I cannot sort it as numeric.
How to join "du folder" and "du -h folder" to see output sorted as "du folder", but with first column from "du -h folder"
P.S. this is just an example. this technique might be very useful for me (if its possible)