Unix noobie here. I've just created a shell script that accomplishes these objectives:
1) Remove all DOS CRs (Carriage Returns) out of a set of actionscript files (.as)
2) Recursively remove CRs from any sub directories (how the heck can you tell the difference between directories and files).
I've written the following script which works, but it feels like a round-about way to accomplish this. What built in commands could have accomplished this task with more elegance? Ie: what's a better way to do this?
Thank you for your replies Raghuram. From what I see, mac2unix is for converting mac line endings to unix, but it isn't avilable in the bash shell either. Is there a way to tell the differences between the bash shell and other shells?
yeah, I did use tr, but is there an easier way to loop recursively through the sub-directories? (Again, thanks for the replies, I'm amazed at how fast they've come).