Well the structure is a bit odd to begin with but basically grep (and most other Unix utilities) is line-oriented. So in your first version, grep sees the input as "xxxyyyzzz" and in the second one, grep sees the input as "xxx\nyyy\nzzz\n". So the first one is similar to echo -e "xxxyyyzzz" | grep "xxx" and the second one is similar to echo -e "xxx\nyyy\nzzz" | grep "xxx"
In reply to Re: Pipe, when this shell command is going to executed ?
by derby
in thread Pipe, when this shell command is going to executed ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |