Advertisement
Guest User

pipe line demo

a guest
May 20th, 2012
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None
  1. bash-4.2$ echo foo | sed 's/^/x/'
  2. xfoo
  3.  
  4. bash-4.2$ echo foo | ( true && tr o O || cat ) | sed 's/^/x/'
  5. xfOO
  6.  
  7. bash-4.2$ echo foo | ( false && tr o O || cat ) | sed 's/^/x/'
  8. xfoo
  9.  
  10. bash-4.2$ echo foo | ( true && ( tr o O; false ) || cat ) | sed 's/^/x/'
  11. xfOO
  12.  
  13. bash-4.2$ echo foo | ( false && ( tr o O; false ) || cat ) | sed 's/^/x/'
  14. xfoo
Advertisement
RAW Paste Data Copied
Advertisement