# Ich habe ein sch"ones Bash Skript geschrieben, zur Rekursiven Ausgabe, aller Verzeichnisse, in gescheihter Form in der Bash - ich verbinde es mit grep - um nach Inhalten in Dateien zu suchen #!/bin/bash l=\$(ls "\$1") cd "\$1" for s in \$l do if [ -d "\$s" ] then echo "\$1/\$s" /bin/bash /home/david/myfind.sh "\$1/\$s" fi done
#!/bin/bash l=\$(ls "\$1") cd "\$1" for s in \$l do if [ -d "\$s" ] then #echo "\$1/\$s" /bin/bash /home/david/myfind.sh "\$1/\$s" "\$2" else #echo "\$1/\$s" cat "\$1/\$s" | grep "\$2" fi done
#!/bin/bash l=\$(ls "\$1") cd "\$1" for s in \$l do if [ -d "\$s" ] then #echo "\$1/\$s" /bin/bash /home/david/myfind.sh "\$1/\$s" "\$2" elif [ -e "\$s" ] then #echo "\$1/\$s" cat "\$1/\$s" | grep "\$2" fi done
#!/bin/bash l=\$(ls "\$1") cd "\$1" for s in \$l do if [ -d "\$s" ] then #echo "\$1/\$s" /bin/bash /home/david/myfind.sh "\$1/\$s" "\$2" elif [ -e "\$s" ] then #echo "\$1/\$s" cat "\$1/\$s" | grep "\$2" if [ "\$?" == 0 ] then echo "\$1/\$s" fi fi done