Skip to content

Instantly share code, notes, and snippets.

@snowleung
Created February 21, 2013 08:13
Show Gist options
  • Select an option

  • Save snowleung/5003115 to your computer and use it in GitHub Desktop.

Select an option

Save snowleung/5003115 to your computer and use it in GitHub Desktop.
use sed to deprecate ios class and method
#!/bin/bash
flist=`find . -name "*.h"`
#echo $flist
for f in $flist
do
echo $f
`sed -i "" '/@interface.*/{s/@interface/__attribute__ ((deprecated))\'$'\n@interface/g;}' $f`
`sed -i "" "/-.*;/{s/;/ __attribute__ ((deprecated));/g;}" $f`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment