I am trying to send a command to
netcat which will result into an output and I want to save that output to a file.
while true; do echo "showHistory userx"; done | nc -w1 xxx.xxx.xxx.xx 2222 > out.txt &
I tried a lot of google searches and read a lot of stackexchange questions but could not solve it. I played around with
mkfifo but no luck.
out.txt remains blank but has a lot of
Edit: I have updated
showHistory userx in order to highlight that it is a command to be supplied over telnet/netcat session