Script to grep a word inside a tar file
search=”123″ tar -tf one.tar | while read filename do if [ -f “${filename}” ] then mv “${filename}” “${filename}.sav” fi # tar -xf one.tar “${filename}” # found=`grep -l “${search}” “${filename}”` if [ ! “${found}””X” = “X” ] then echo “Found \”${search}\” in \”${found}\”” grep “${search}” “${filename}” echo “” fi # if… Continue Reading Script to grep a word inside a tar file