User Tools

This is an old revision of the document!


#! /bin/bash
crawl() {
  for i in *; do
    if [[ -f $i ]]; then
      #echo "fichier : " $i
    fi
    if [[ -d $i ]]; then
      echo "dossier : " $i
      cd $i
      crawl
      cd ..
    fi
  done
}
crawl
<pre class=“brush:bash;gutter=false;”> #! /bin/bash crawl() {

for i in *; do
  if [[ -f $i ]]; then
    mv $i $(echo $i | tr 'a-z' 'A-Z');
  fi
  if [[ -d $i ]]; then
    new=$(echo $i | tr 'a-z' 'A-Z');
    if [[ $i != $new ]]; then
      mv $i $new;
    fi
    cd $new
    crawl
    cd ..
  fi
done

} crawl </sxh>

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information