| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
Greetings
Sorry for long silence.
> Hold buffer: Is "H" and "h" the same?
No. "h" - replace current hold with pattern. "H" - add pattern to current hold.
>> Removing the "\d183" on the LHS and the "-" on the RHS of the s-command
It work for me. Checked on sed 4.2.2.93-31c8-dirty - windows binary https://db.tt/0nXKF049
Please check commands
y/\d034\d032\d111/123/
It must replace quote ("), space and "o" to 1 2 3 accordnly
>I simply removed the "y" command but must confess that your code
>sometimes gave some unexpected results.
Sorry, i made an error in replacement. I wrote
s/\x20*.?([-+_.]).?\x20*/\1/g
Correct string
s/\x20*\.?([-+_.])\.?\x20*/\1/g
s/[ÄÜÖ]/\0e/g
Add "e" to umlauts
s/ß/ss/g
Replace ss
y/ÄÜÖäüö&\d183/AOUaou+-/
Replace umlauts and other symbols with analogues
s/([-+_.\x20]){2,}/\1/g
Remove duplicates of [-+_.\x20]
s/\x20*\.?([-+_.])\.?\x20*/\1/g
Remove spaces and dots around [-+_.]
sed --text -r -e "h;s/.*\\//;s/[ÄÜÖ]/\0e/g;s/ß/ss/g;y/ÄÜÖäüö&\d183/AOUaou+-/;s/([-+_.\x20]){2,}/\1/g;s/\x20*\.?([-+_.])\.?\x20*/\1/g;H;x;s/^/ren \x22/;s/$/\x22/;s/\n/\x22\x20\x22/" "infile" > "outfile"
Best regards.
[Non-text portions of this message have been removed]