SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By jchalo99
#147629
I dont know the correct place to put this but...

my boss gave me a project at work to modify HUNDREDS of similar files. they originated in QEDIT i believe, but they are simple text files. He wants me to go threw all these files and format the heading. replace a few control characters that got changed ex: "\y" is supposed to make it a heading, or "ý" is supposed to make it the squared symbol.

How can i go threw an entire directory to find all these control characters and change them to what they are supposed to be? also change the file extension and formatting of certain sections.
By lyndon
#147649
Many programming editors have a function like this. For a suitable place to ask these types of questions go to stackoverflow.com and you'll probably get dozens of good suggestions.
User avatar
By shimniok
#147654
Unix, Linux, Cygwin available by any chance?

You could use a combination of shell / sed or perl depending on what exactly you need to do very quickly.

So "ý" is supposed to become what in text? These are text files but obviously they have some kind of escape sequences or markup or something, right?

for i in *
do
sed $i 's/ý/newmarkupescsequencewhatever/g'
done