I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working.
sed -i 's/"|"/\^/g' *.dat
Is this the proper way to use sed command thank you very much for help.
Note that sed is only defined to work on text files and data files with the filename extension .dat are frequently binary files that do not meet the requirements of text files!
In what way is it "not working"?
Does it produce any diagnostic messages?
Does it just work on the first named file operand?
Is it using your editing command as a filename extension for your backup files instead of as an editing command?
If you're on a system using a BSD-based sed , does the command:
Hi dodona,
How is a regular expression matching zero or more occurrences of a <period> characters supposed to match the string "|" in a sed substitute BRE?
Why are you escaping a <circumflex> character in a replacement string in a sed substitute command?