I am making a simple chat using netcat, from this forum, and I have run into some trouble...
When executing this script:
#!/bin/bash
sshpass -p \!Password ssh maliciouzzhd@10.0.0.1 "export DISPLAY=:0 && xterm -e \"mawk -W interactive "$0='Jacob: '$0" | nc -l -p 1234 -s 10.0.0.1\"" &
sleep 2
echo "Chat Started!" && mawk -W interactive '$0="Parents: "$0' | nc 10.0.0.1 1234
I get:
mawk: line 1: syntax error at or near =
(I am executing the script from my Mac, so the first line of code will start the connection from my laptop, the third will connect to the laptop from the Mac)
If anyone knows how to fix this, it would be greatly appreciated!