Working –in-place “sed” option under WindowsBy neokrates, written on November 21, 2010 |
cmd bat snippet |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Rate it
Ad
Poll
What SVN client do you use?
- Don't use SVN (93%, 14 Votes)
- Command line (7%, 1 Votes)
- Subversive (0%, 0 Votes)
- Subclipse (0%, 0 Votes)
- Idea SVN (0%, 0 Votes)
- TortoiseSVN (0%, 0 Votes)
- Different tool (0%, 0 Votes)
Total Voters: 15
Loading ...
Most popular search terms:
For long time gnu sed port had this error, or issue, if you will.
The --in-place (-i) option was not working. Now it does.
You will need this modified sed (it is called ‘ssed’):
http://sed.sourceforge.net/grabbag/ssed/
-i works now: ssed -i.backup -e "s/REPLACE_ME/REPLACED YOU/" input.txt
@echo Before: @more input.txt @ssed -i.backup -e "s/__REPLACE_ME__/REPLACED YOU/" input.txt @echo After: @more input.txt @del input.backup
I couldn’t get ssed not to create the input.backup file. So I add an extra line to delete it: @del input.backup.
Backup file must be removed, or you might get: ssed: cannot rename input.txt: File exists second time you try the same ssed command.
I used ssed 3.62.
Have fun!
|
TAGS
|
|
RELATED
|
Pages
Posts
|
|
SOCIAL
|


















