-
-
Save stephencelis/102151 to your computer and use it in GitHub Desktop.
`open' with stdin
This file contains 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
#!/bin/sh | |
# A better open: with stdin. | |
if tty -s | |
then | |
/usr/bin/open $@ | |
else | |
while read input | |
do | |
/usr/bin/open $input | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment