In Linux I need to send a sequence of AT commands to a serial port on e.g.
echo 'AT' > /dev/ttyS0
echo 'ATS0=0' > dev/ttyS0
If you install the PPP package you can use the
chat program that comes with it. Or you can use
kermit. Or the
cu program that comes with uucp. But to do it with pure shell is trickier. You might be able to use the read and printf functions, with stdio redirected to the port.
stty -F /dev/ttyS0 38400 raw chat -f script.txt < /dev/ttyS0 > /dev/ttyS0
Should get you started.