Last active
August 29, 2015 14:27
-
-
Save vvv/2b43d722ba79f7620f1d to your computer and use it in GitHub Desktop.
Surprise of the day
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat noexit.sh | |
#!/bin/sh | |
seq 100 | while read; do exit; done # If `exit' terminated the script .. | |
echo 'Still alive!' # .. this message would not be printed. | |
$ | |
$ sh noexit.sh | |
Still alive! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bash(1) says:
Kudos to ismaildonmez for the reference!