Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
#!/bin/bash # Concatenates two video files. # Codifing on the fly. # Fede Diaz (aka nordri) nordri at gmail.com # http://nordri.blogsome.com # Jun 27 2009 STRING=""; FLAG=0; for file in *.avi; do ls $file | grep -i cd1 >/dev/null; if [ $? -eq 0 ]; then STRING=" $file "; FLAG=0 else STRING="$STRING $file " ; FLAG=1; fi; if [ $FLAG -eq 1 ]; then echo "Concatenating . . ."; cat $STRING > CAT.$file; echo "Coding . . ."; mencoder -ovc copy -oac copy -forceidx -o MEN.$file CAT.$file; echo "Cleaning"; rm -v $STRING CAT.$file fi; done
This paste will be private.
From the Design Piracy series on my blog: