I use the telnet command to check if MySQL port is responding.

```
telnet 10.10.10.24 3306

```

I use the ctrl character to disconnect. This is working as expected.
How do I use this command in shell script?