Write a shell script that takes a file names as a argument and deletes this file from every directory above the present working directory.
if [ $# -eq 0 ] then echo "pass the file name" exit fi fl=$1 ch=1 h=/home while [ $ch -eq 1 ] do cd .. p=`pwd` echo "$p/$fl" rm `echo "$p/$fl"` 2> /dev/nullif [ $p = $h ] then ch=0 fi done