Hi,
I have the following aliases:
$: alias | grep "^du="
du='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn'
$: alias | grep "^dutop10="
dutop10='du -s * 2>/dev/null | awk '\''{ printf "%4.2f-KB ==> %s \n", $1/1024 , $2 }'\'' | sort -rn | head -10'
du is working like I expect it to be but dutop10 isn't and I can't figure out what's wrong.
Runtime example running du as below:
$: du
0.02-KB ==> test13
0.01-KB ==> test9
0.01-KB ==> test8
0.01-KB ==> test7
0.01-KB ==> test6
0.01-KB ==> test5
0.01-KB ==> test4
0.01-KB ==> test3
0.01-KB ==> test2
0.01-KB ==> test15
0.01-KB ==> test14
0.01-KB ==> test12
0.01-KB ==> test11
0.01-KB ==> test10
0.01-KB ==> test1
Runtime example running dutop10 as below:
$: dutop10
[7] + Done dutop10
Yes, that's all it has, not sure what's Done is it referring to
But running the alias du | head -10 works fine below.
$: du | head -10
0.02-KB ==> test13
0.01-KB ==> test9
0.01-KB ==> test8
0.01-KB ==> test7
0.01-KB ==> test6
0.01-KB ==> test5
0.01-KB ==> test4
0.01-KB ==> test3
0.01-KB ==> test2
0.01-KB ==> test15
$: uname -a
SunOS <hostname> 5.9 Generic_122300-62 sun4u sparc SUNW,Ultra-80
What am I doing wrong?