1
0
Fork 0
interesting/bin/interesting

19 lines
239 B
Bash
Executable File

#!/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