Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] grep, sed, and cat - oh my! [SOLVED]



Daniel, Nicolas, Mattia,

Thank you guys so much for responding!

After a little experimentation, I ended up with a bit of a combination of your suggested edits. This is what I have now:

For the combination of Javascript files:

cat $( find $DIR -type f -name '*.js' ) > $DIR/all.js

For editing the line in the HTML files:

find $DIR -type f -name '*.html' -exec sed -i 's/.*<script type="text\/javascript" charset="utf-8" src="javascript\/includes.js"><\/script>.*/<script type="text\/javascript" charset="utf-8" src="all-min.js"><\/script>/g' {} \;

Works like a charm!

Your time and expertise is much appreciated!

--
Dave M G


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links