uptime in bash prompt
I was bored today, so I thought I'd make an uptime script for use in my prompt. I fiddled with grep etc, but I cant make it work when uptime goes from 9 -> 10, 99 -> 100 etc...
So.. does anyone else know?
Another question; anyone have a solution to how I can make the width of Current Working Directory dynamic and make it print only the last 45 chracters of the directory or so? Its annoying when my lovely prompt look shitty because the directory is 150 chars long... ;>
thx for any help.