CLI Tips

Development June 19th, 2006

The following short scripts are part of CLI magic in my daily work:

Batch rename the file extension
Want mv *.f90 *.f? Here is one:

for x in *.f90 ; do mv $x ${x%.*}.f ; done

dos2unix

perl -pi -e ‘s/\r\n/\n/;’ *.f90
Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

Leave a Comment