libera/#maemo/ Saturday, 2019-04-20

brolin_empeysicelo: 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_empeys/commnand/command/08:51
luke-jrtr doesn't replace strings08:53
luke-jronly characters08:53
sixwheeledbeastThe 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
sixwheeledbeastI have also fell into replace for blank, where sed '/foo/d;/bar/d' would be more efficient09:41
DocScrutinizer05sth in grep urgently needs optimization:  https://pastebin.com/7y1Kx3W609:59
Maxdamantusbut the `d` command discards the current line.11:34
Maxdamantusrather than just removing a character.11:34
MaxdamantusDocScrutinizer05: try LC_ALL=C11:36
Maxdamantusalternatively, you could just use sed, which doesn't seem to do the unnecessary unicode processing (which I think is basically wrong anyway)11:40
sixwheeledbeastI suppose so, depends on the situation as yu say12:35
DocScrutinizer05on 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
DocScrutinizer05mad useful21:04
DocScrutinizer05sorry, replace $* by "$@"21:09
DocScrutinizer05anyway, don't miss http://sed.sourceforge.net/sed1line.txt21:12
DocScrutinizer05you can bin ca 50% of other tools like tr, head, tail, whatnot.  sed does it all21:13

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!