Hey now here a kludge...rearranging only worked until there were spaces in the name.....I can tidy this up but would use the same method. I suspect the difference is to do with how multiple lines are handled in the terminal as apposed to a script
Code:
function _status (){
#stupid but what works in terminal will not work here so heres a bodge....
ps | grep 'wget -c' | grep -v grep | sed 's%.*/\(.*\)-o.*%\1%' > /tmp/tart.status1
ps | grep 'cclive -c' | grep -v grep | sed 's%.*/\(.*\)http.*%\1%' >> /tmp/tart.status1
echo -e "\c" > /tmp/tart.status
while read I ;do
echo ${I##*/} >> /tmp/tart.status
done < /tmp/tart.status1
}
I'm just assuming the first part of sed does not work reliably....all I wanted was to preserve the users readable name choice
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum