SHARE
TWEET

Untitled

a guest Nov 15th, 2017 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. aaa
  2. 111
  3. bbb
  4. 111
  5. ccc
  6. 111
  7. ddd
  8.    
  9. #!/bin/sh
  10. while read -r line ; do
  11.     echo "Processing $line"
  12. done < <(grep 111 abc.txt)
  13.    
  14. ./a: line 4: syntax error near unexpected token `<'
  15. ./a: line 4: `done < <(grep 111 abc.txt)'
  16.    
  17. #!/bin/bash
  18. while read -r line ; do
  19.     echo "Processing $line"
  20. done < <(grep 111 abc.txt)
  21.    
  22. Processing 111
  23. Processing 111
  24. Processing 111
  25.    
  26. -rwxr-xr-x  1 root root 938736 May 10  2012 bash
  27. lrwxrwxrwx. 1 root root      4 Feb 13 10:20 sh -> bash
  28.    
  29. man bash
  30.    
  31. When invoked as sh, bash enters posix mode after the startup files are read.
RAW Paste Data
Top