19 lines
239 B
Plaintext
19 lines
239 B
Plaintext
|
#!/usr/bin/env sh
|
||
|
|
||
|
input=""
|
||
|
output=$HOME/blogs/interesting/src/interesting.txt
|
||
|
|
||
|
if [[ -p /dev/stdin ]]
|
||
|
then
|
||
|
input="$(cat -)"
|
||
|
else
|
||
|
input="${@}"
|
||
|
fi
|
||
|
|
||
|
if [[ -z "${input}" ]]
|
||
|
then
|
||
|
return 1
|
||
|
fi
|
||
|
|
||
|
echo "$(date -Iseconds) ${input}" >> $output
|