#!/bin/bash # save to specified file, the flash video you just played in FireFox PID=`ps -ef | grep libflashplayer.so | grep -v grep | awk '{print $2}'` FD=`lsof -p $PID | grep Flash | awk '{print $4}' | sed 's/u$//'` cp /proc/$PID/fd/$FD "$1"