Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@Lyx @Owl @Owl @kirby It's bash/sh.
I called it ifsrev because it's basically like using rev(1) but with internal field separator (a la read(1P)).
tr is a replacement function, so replace the second argument with a newline throughout the first argument (I probably should have done those the other way around so the body would be just second argument onward), then tac is inverse cat - read lines out from last to first - then tr it again to replace the newlines.
So it will produce incorrect output if the input contains a newline.
Also the last bit is to strip out random newlines/blanks of some kind, I forget what. Probably not actually necessary except when dealing with something extremely anal like ACME.