Skip to content

Instantly share code, notes, and snippets.

@Pondidum
Created September 23, 2011 08:06
Show Gist options
  • Select an option

  • Save Pondidum/1236942 to your computer and use it in GitHub Desktop.

Select an option

Save Pondidum/1236942 to your computer and use it in GitHub Desktop.
Delete matching lines in files
#!/bin/bash
files=$(find . -type f -name '*.Designer.vb' -print0 | xargs -0 grep -l 'TextReadOnly = False')
for file in $files
do
sed '/TextReadOnly = False/ d' $file >$file.tmp
mv $file.tmp $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment