Hacker News new | ask | show | jobs
by jfhufl 2765 days ago
Like so?

    % echo 'one\ntwo\nthree' | sed -e 's,$, four,'
    one four
    two four
    three four
1 comments

No, like this:

    > echo ‘one\ntwo\nthree’ | tr \n \|
    one|two|three
echo -e 'one\ntwo\nthree' | sed -ze 's/\n/|/g'
Hey, thanks for teaching me that!