If I am writing a bash script to do an inplace edit of a bunch of files and the line I want to change is something like:
#include <foo/bar.h>
to
#include "bar.h"
what would the syntax be?
old='#include <foo/bar.h>'
new='#include "bar.h'
perl -pe -i.bak 's/$old/$new/g' baz.h
If all the files are in the same directory, this should work: