Potreboval bych na / najit vsechny soubory, ktere obsahuji bash, sh .... skripty.
Tento skript nefunguje:
find / -type f | while read F
do if [ "file "$F" | grep -o shell script text" = "shell script text" ]
then cp "$F" mnt/data/prechodne/skripty
fi
done
Edit: uz mi to funguje jen mi to pripadne dost zprasene a narocne na vykon. neslo by to jeste zjednodusit?
find / -type f | while read F
do if [ "`file "$F" | grep -o "shell script text"`" = "shell script text" ]
then cp "$F" /mnt/data/prechodne/skripty
fi
done