/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh if [ -t 0 ]; then echo running interactivelly else while read -r line ; do echo $line done fi
URL: http://stackoverflow.com/questions/2456750/detect-presence-of-stdin-contents-in-bourne-shell