0

I have a text file that has numerous instances of the character '^'. I need all those instances replaced with a '['.

I prefer to use cygwin but would use windows command prompt if there is a direct way to do this. My initial instinct was to use Access (no other DB installed) to use the 'replace' function, but as I'm connecting using Jet - apparently this is not possible as per Exception when trying to execute "REPLACE" against MS Access

What's the cleanest way to achieve this?

Community
  • 1
  • 1
user2029890
  • 2,493
  • 6
  • 34
  • 65

2 Answers2

3

Try this:

sed -i 's/\^/\[/g' myfile
Aleks-Daniel Jakimenko-A.
  • 10,335
  • 3
  • 41
  • 39
  • 1
    Perfect! People like you make this site awesome. Instant answer, instant correction by someone and it works. Thanks! – user2029890 Aug 26 '13 at 02:34
0

I've tested this: sed 's/\^/[/g' //by the command line

Xxcc
  • 91
  • 5