code_junkie

lambda functions in bash

Nov 13th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. $ someCommand | xargs -L1 (lambda function)
  2.  
  3. somecommand | while read -r; do echo "Something with $REPLY"; done
  4.  
  5. somecommand | xargs -d"n" -I{} echo "the argument is: {}"
  6.  
  7. seq 1 10 | tr 'n' '' | xargs -0 -n 1 bash -c 'echo any bash code $0'
Add Comment
Please, Sign In to add comment