Skip to main content
2 of 2
with date option
Archemar
  • 32.3k
  • 18
  • 75
  • 107

Found the solution by myself :)

./telnet.sh | telnet > /tmp/top.txt 

In this way I redirect the command to an output file. However, I have to run the same script many times and I don't want overwrite the same file, but I would create and incremental file (good idea would be renamed with DATE command).

to use a date option

./telnet.sh | telnet > /tmp/top-$(date +%Y%m%d-%T).txt
Federi
  • 963
  • 8
  • 28
  • 40