How to remove multiple space when using cut command
If we want to use cut command but there are more space in the delimiter then you will not get proper output.
So to avoid the we can use tr command to squeeze the multiple spaces and then use cut command
Example:
df -h |tr -s ' ' |cut -d ' ' -f 1,5
Post a Comment
Post a Comment