0
votes
1answer
40 views

sed: What does exit code 2 mean?

Case I am trying to replace all occurrences of <value>*</value> into <value>file:\\</value> in a designated file test.txt. I work on Windows and use sed I have installed with ...
0
votes
1answer
68 views

Regexp based editing of content in large CSV files [duplicate]

I wanted to remove certain pattern of contents based on a regex from csv file which is very large in size containing 100,000+ records, how is it possible via windows commandline? I also have sed and ...
1
vote
1answer
1k views

How to use variables in sed on Windows?

I'm writing a batch script to automate build events on Windows, and as part of it I need to change some lines in a few files. So I'm going to use sed. But how do I use variables in sed inside a batch ...
0
votes
1answer
120 views

how to get access to environment variables from output file

I want to get variables from a output file specific location,and input file format as below: log1.txt format: [v] Output Data ...
3
votes
1answer
677 views

Replace path on Windows with sed?

I'm trying to get rid of all paths that include the current directory, so I did my_command | sed "s/%CD%//ig" in the command prompt, but it didn't work -- everything came out just like before. How ...
8
votes
3answers
2k views

Cygwin bash sed locks my files

When I change files in cygwin bash with the sed command, the file gets locked. Reproduce: Open cmd and cd to non-user directory (f.e. temp) echo aaa > test.txt Open in texteditor, add line, try ...
1
vote
2answers
6k views

Sed for windows

I am attempting to use SED for the first time. To complicate matters, i am using it in windows. I downloaded from this source. Since I don't have install privileges on my work machine I created a ...
0
votes
1answer
61 views

sed grouping cancels out results?

When running the following sed command under Windows (to uppercase a keyword which isn't part of another word): "c:\Program Files (x86)\GnuWin32\bin\sed.exe" -e "s/[^a-z]*declare[^a-z]*/DECLARE/I" ...
0
votes
1answer
473 views

Command line solution for removing parts from a binary file?

I have a binary file and I would like to remove parts from. By removing I mean deleting those parts and thus making the file's size smaller. The parts would be between two ASCII strings. So, for ...
2
votes
2answers
2k views

Search & replace back slashes to forward slashes in windows

Lately I've been needing to delete new untracked files from my versioning system. Being in linux I use: hg status -un|xargs rm And it works nice, but when doing it in windows, hg status lists paths ...
7
votes
1answer
3k views

Can GNU sed (for Windows) handle Unicode? If so, is it a code-page/locale issue, or a switch?

I've been using GNU SED on and off for a couple of years now. It spins me out a bit sometimes, but it does a good job... for single-byte char sets! I now and then notice references to GNU SED being ...