In these four code snippets, I like the first two, but not the last two:
sleep 10 & dateSo? So, for the same reason, I would re-write:
sleep 10 &
date
sleep 10 & \
date
sleep 10 \
& date
grep :0: /etc/passwd | \as
wc -l
grep :0: /etc/passwd |and
wc -l
grep -c jsh /etc/passwd \as
|| echo jsh not found
grep jsh /etc/passwd ||The symbols ', ", `, &, |, &&, and ||, at the ends of lines, say "I'm not done," and automatically continue to the next line (or, in the case of the quote, until the closing quote).
echo jsh not found
For shell symbols with parens, like $( and <(, the continuation is until the matching, closing paren.
No comments:
Post a Comment