Code: Select all
ps | grep 'wget -c' | grep -v grep | sed 's%.*/\(.*\)http.*%\1%' >> /tmp/tart.status
9613 root 1404 S wget -c -o /tmp/tart.test -O /mnt/hda2/test.iso http://distro.ibiblio.org/pub/linux/distributions/puppy
expected result
test.iso
gives full line...breaking down the command truncation happens in the wrong places.
yet...
Code: Select all
ps | grep 'cclive -c' | grep -v grep | sed 's%.*/\(.*\)http.*%\1%' >> /tmp/tart.status
9684 root 1876 S cclive -c -f mp4 -O /mnt/hda2/test.mp4 http://www.youtube.com/watch?v=Sv5iEK-IEzw
gives expected
test.mp4
confused
mike
ok ..the eventual workaround was to turn around the wget commant to give
11061 root 1400 S wget -c -O /mnt/hda2/test.iso -o /tmp/tart.fhsgjsgfjs http://distro.ibiblio.org/pub/linux/distributions/pup
but I would like to know why there was a difference between the command line and script.