Dec 5, 2011, 8:30 PM
perl one liner - need some advice
Wondered if someone could help me here with a one liner for perl???
What id like to do is run a perl command against a 55GB file (1mnths logs) to substitute 1 character "/" for ","
log file snippet
what id like to do is substitute the "/" for a comma but only on lines where there is a DIA_CCR. Does anyone know if this is possible from the command line?? Also the reason id like to use perl or sed is because its not so CPU or memory hungry and this is being run against a live server...
I've already used some one liners to substitute the date format, the reason I'm doing this is so i can load it into SQL and run queries against the data.
Here are a few commands I've already ran on the file
sed 's/:/./3' file1 > file2
perl -pe 's/_/ /' file1 > file2
any help appreciated.