Linux CLI Tricks
Re-use last command's arguments
<new command> !$
execute last command
!!
bind F1 to manual for last command
bind '"\eOP":"man !!:0\n"'
test connection to port
nc
--zero --verbose <host> <port>
1
see also
Bash one-liners
Command line fu
StackOverflow: favorite command line tricks
[1]
you can use
telnet
, but this doesn't automatically close the connection