git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/localfs/etc/profile.d/netcatandquit.sh
blob: 54100515dac02ab7e259666c2bb798c796c2ca0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# H. P., 2017-04-17
# Quick helper to have an ncat command available which, similarly to netcat -z,
# terminates the ncat connection as soon as there's a successful establishment.
#
# tl;dr fek incomplete replacements 凸ಠ_ಠ)凸


# Let's check whether "echo -e" outputs "echo -e", we then will quit
# 	(no escape sequences mean no escape, lel.)
echo -e "moo"|grep -- "-e moo" >/dev/null 2>&1
[ "$?" -eq 0 ]&&exit 0

alias ncquit='echo -ne "\e[3;12r\e[3H"|ncat'