18 lines
188 B
Bash
18 lines
188 B
Bash
|
|
||
|
|
||
|
#!/bin/bash
|
||
|
|
||
|
pipe=/tmp/testpipe
|
||
|
|
||
|
if [[ ! -p $pipe ]]; then
|
||
|
echo "Reader not running"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
|
||
|
if [[ "$1" ]]; then
|
||
|
echo "$1" >$pipe
|
||
|
else
|
||
|
echo "Hello from $$" >$pipe
|
||
|
fi
|