For example, when you have a tor socks proxy in localhost, using netcat (nc), it would be similar to:
nc -v -X5 -x localhost:9050 <server> <port>
and for ncat:
ncat -v --proxy localhost:9050 --proxy-type socks5 <server> <port>
Of course, you can use any proxy. It is very useful for scripting ;)