I use both Linux and FreeBSD (specifically, I use Debian Linux and PC-BSD), and I found something weird about sed
.
I frequently need to convert "tab separated values" files to "comma separated values". The simplest way I know is to use sed
, like this:
sed 's/\t/,/g' inputFile.txt > outputFile.csv
This works perfectly on Linux: It replaces every tab with a comma... but on FreeBSD, it doesn't replace anything!!!
Am I missing something? Is there a syntax with FreeBSD sed
that is different to the one on Linux?
-E
option makes the trick (both on FreeBSD and on Mac OS X). – Barranka Nov 28 '13 at 18:20