19 lines
239 B
Bash
Executable File
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
|