Occasionally I run across a source file with tabs in it. There are many ways to remove tabs. I prefer to use perl from the command line. Replace all tabs with two spaces in a command line perl script: [bash] perl -pe ‘s/\t/ /g’ -i myFile.cpp [/bash] And, with bash, do it for all files [...]
Tag Archives | perl
How to parse command line arguments/parameters in C/C++/Perl/Python/Bash
This is the first of a series of simple posts highlighting programming idioms in several languages. One of the perils of programming in multiple languages regularly is that I sometimes forget simple things about a language. This series is intended as a reference for myself and others when switching back and forth between languages. There [...]