I am having trouble creating an alias for this in my .profile. I tried this:
alias dfg='df -g |awk -F" " '{sub(/blocks/,"");if (length($1) > 15 ){printf("%s\t%s\t%s\t%s\t%s\n",$1,$2,$3,$4,$5)} else {printf("%s\t\t%s\t%s\t%s\t%s\n",$1,$2,$3,$4,$5)} } ''
the result i get when i logback in is...
I grabbed this from a previous thread that is now closed. I used this to get the ouput for the df command:
df|awk -F" " '{ if (length($1) > 15 ){printf("%s\t%s\t%s\t%s\t%s\n",$1,$2,$3,$4,$5)} else {printf("%s\t\t%s\t%s\t%s\t%s\n",$1,$2,$3,$4,$5)} } '
problem is when i use df -g |awk -F" " '{...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.