brolin_empey | sicelo: If you only need to replace a literal string in a shell pipeline then you can use tr instead of a substitute commnand in sed. | 08:50 |
---|---|---|
brolin_empey | s/commnand/command/ | 08:51 |
luke-jr | tr doesn't replace strings | 08:53 |
luke-jr | only characters | 08:53 |
sixwheeledbeast | The example was a single char as far as I can tell. Also maybe either tr or sed's delete would be more ideal over replace for blank? | 09:25 |
sixwheeledbeast | I have also fell into replace for blank, where sed '/foo/d;/bar/d' would be more efficient | 09:41 |
DocScrutinizer05 | sth in grep urgently needs optimization: https://pastebin.com/7y1Kx3W6 | 09:59 |
Maxdamantus | but the `d` command discards the current line. | 11:34 |
Maxdamantus | rather than just removing a character. | 11:34 |
Maxdamantus | DocScrutinizer05: try LC_ALL=C | 11:36 |
Maxdamantus | alternatively, you could just use sed, which doesn't seem to do the unnecessary unicode processing (which I think is basically wrong anyway) | 11:40 |
sixwheeledbeast | I suppose so, depends on the situation as yu say | 12:35 |
DocScrutinizer05 | on topic: alias man=':(){ [ "sed" == "$1" ]||{ /usr/bin/man $*;return; }; less -f <(/usr/bin/man sed) <(wget http://sed.sourceforge.net/sed1line.txt -q -O -); };:' | 21:04 |
DocScrutinizer05 | mad useful | 21:04 |
DocScrutinizer05 | sorry, replace $* by "$@" | 21:09 |
DocScrutinizer05 | anyway, don't miss http://sed.sourceforge.net/sed1line.txt | 21:12 |
DocScrutinizer05 | you can bin ca 50% of other tools like tr, head, tail, whatnot. sed does it all | 21:13 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!