add new feature, sed, Manipulate lines using sed#79
add new feature, sed, Manipulate lines using sed#79jihuichoi wants to merge 3 commits intojohanhaleby:masterfrom
Conversation
|
Thanks for the PR! Before I merge this in, isn't it possible to pipe the stream to sed instead of adding it to the bash script? |
Yes. it's possible. However it was extremely slow. it worked, but it was too slow. Secondly, I tried another way like grep code in existing kubetail code. I don't know why but anyway it didn't work. it seemed to treat additional "sed" command as tail's option. I'm not an expert of shellscript, so my method might not be the best way. but it works very well for me and it is my best code.(a little bit ugly, though) I wish you or another folks make it pretty if you think it's useful. Thanks. |
It's a simple feature. Probably self-explanatory.
I can change the log format but sometimes just want to see in shortform or give some alarm on it for temporary. I guess this feature will be good for that sort of demands.
usage:
$ kubetail -sed 's/findString/replaceString/g'
or
$ kubetail -sed 's/findString/replaceString/g' -sed 's/findString2/replaceString2/g'