Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash script get value from piped input

#!/bin/bash
if [[ -p /dev/stdin ]]
    then
    PIPE=$(cat -)
    echo "PIPE=$PIPE"
fi
echo "ARGS=$@"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #script #piped #input
ADD COMMENT
Topic
Name
8+9 =