Skip to content

Instantly share code, notes, and snippets.

@rossdylan
Created July 18, 2013 23:43
Show Gist options
  • Select an option

  • Save rossdylan/6034022 to your computer and use it in GitHub Desktop.

Select an option

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
#!/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