redirecting output from telnet / nc to file in script fails when cron'd
- by qhartman
So, I have device on my network which sits there listening on a port for a connection, and when a connection is made it dumps ascii data out. I need to capture that data to a file. I wrote a dead simple shell script that does this:
#!/bin/bash
#Config Variables. Age is in Days.
DATA_ROOT=/root/data
FILENAME=data_`date +%F`.dat
HOST=device…