On Thu, 31 May 2001, Ross Davis wrote:
>>> PROMPT_COMMAND="echo -e \"\033[0;32m[\$(date +%a\ %b\
> %e)](\$NEWDIRSIZE)[\$(jobs | wc -l | awk '{print \$1}')]\033[0m\""
>Right. 2 things:
1. Instead of putting "[\$(jobs | wc -l | awk '{print \$1}')",
you could put \j in your $PS1 prompt. From the bash manpage:
\j the number of jobs currently managed by the shell
2. You could have a script running in the background that works out the
dir size, and outputs it to a file like .homedirsize. You could then
replace (\$NEWDIRSIZE) with (\$cat .homedirsize).
Steve
--
"My mom had Windows at work and it hurt her eyes real bad"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!