#!/bin/bash
# shell script for downloading flash video files from the active browser
proc_number=`pgrep -f flashplayer | wc -l`
if [ $proc_number = "1" ]
then
proc_id=`pgrep -f flashplayer`
cd /proc/$proc_id/fd
file_number=`ls -l | grep 'deleted' | awk '{ print $8 }'`
cp $file_number ~/Desktop
echo "One file copied to desktop, name is $file_number"
else
echo "No files copied"
fi
Save the file and run chmod 755 to make it executable.Now run it by typing ./[filename]
No comments:
Post a Comment