Created
July 18, 2013 23:43
-
-
Save rossdylan/6034022 to your computer and use it in GitHub Desktop.
force a command that doesn't take input from stdin to take input from stdin
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
| #!/bin/bash | |
| cmd=$@ | |
| while read -r; do | |
| echo "$($cmd $REPLY)" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment