eXTReMe Tracker
Jan 082015
 

After running a couple of processes using the pipe, if you want to append a string or a variable to the end of each output line.

x1=10
stuff | worked | on | sed
-e "s/\(^.*\)/\1 $x1/"

This appends 10 to the end of each output line

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)