Skip to content

Instantly share code, notes, and snippets.

@sms420
Created September 14, 2009 04:59
Show Gist options
  • Select an option

  • Save sms420/186511 to your computer and use it in GitHub Desktop.

Select an option

Save sms420/186511 to your computer and use it in GitHub Desktop.
insert at beginning of file
#!/bin/bash
find ./ -name '*.txt' -print | while read i
do
sed '1i\
LINE ZERO DUDE' $i >$i.bak && mv $i.bak $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment