telegraf/plugins/outputs/execd/examples/file/file.sh

6 lines
170 B
Bash
Raw Normal View History

2020-07-02 23:59:29 +08:00
# Usage: sh file.sh output_filename.ext
# reads from stdin and writes out to a file named on the command line.
while read line; do
echo "$line" >> $1
done < /dev/stdin