Skip to content

Instantly share code, notes, and snippets.

@missinglink
Last active December 30, 2015 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save missinglink/7806099 to your computer and use it in GitHub Desktop.
Save missinglink/7806099 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo '--- 1 ---'
ls -1 | cowsay
function pause {
read -p "$*"
}
function multi {
while read -r; do
for i in ${@:1}; do
$i $REPLY;
done
done
}
pause 'Press [Enter] key to continue...'
echo '--- 2 ---'
ls -1 | multi cowsay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment