/ Published in: Bash
URL: http://stackoverflow.com/questions/2456750/detect-presence-of-stdin-contents-in-bourne-shell
Expand |
Embed | Plain Text
#!/bin/sh if [ -t 0 ]; then echo running interactivelly else while read -r line ; do echo $line done fi
You need to login to post a comment.
