I might just be crazy or particularly dumb today but what I'm trying to do is have sed
replace the first and second instance of a character on a line but not after that.
Basically it is a csv file with a date formatted as dd/mm/yyyy
and I need to completely remove the slashes. No problem using:
sed 's/\///g' < file > outputfile
The only problem is that one of the columns after this may also contain these slashes and shouldn't be removed.
I must have read every single sed page on the net today to find a way to do it to no avail! Is it as simple as :
sed 's/\///1' < file > outputfile
And then run the same on the output file again? these two slashes will always be the first and second slashes in the file. I guess this would accomplish it but I would rather find the right way to do it!!
As always any help is greatly appreciated!