parent
62e95a50ef
commit
a313b122ab
5 changed files with 13 additions and 42 deletions
@ -0,0 +1,11 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
IP="$1" |
||||
|
||||
if [ -n "$IP" ]; then |
||||
nmap $IP -p0- | # Get the nmap output |
||||
cut -d '/' -f1 | # |
||||
sed -n '/^[0-9]/p' |
||||
else |
||||
echo "Print an ip address" |
||||
fi |
@ -1,40 +0,0 @@ |
||||
#!/usr/bin/env sh |
||||
|
||||
function format0to9 { |
||||
cat - | |
||||
sed -E '/\$mod(\+Shift)?\+[1-9]/d' |\ |
||||
#sed -nE '/\$mod(\+Shift)?\+0/p' |\ |
||||
sed -E '/\$mod(\+Shift)?\+0/ { s/0/[1-9,0]/; s/10/[1-10]/g}' |
||||
} |
||||
|
||||
function formatLine { |
||||
while read line; do |
||||
if echo "$line" | grep -q "exec"; then |
||||
echo "$line" |\ |
||||
awk '{print "# "$1 "\n"; $1=$2=""; print " Runs the shell command: \n\n```bash\n" $0 "\n```\n" }' |
||||
else |
||||
echo "$line" | awk '{print "# "$1 "\n"; $1=""; print $0 "\n" }' |
||||
fi |
||||
done; |
||||
} |
||||
|
||||
cat $HOME/.dotfiles/i3/configWork |\ |
||||
#Gets lines that start with bindsym |
||||
sed -e "/^#/d" -ne "/^bindsym/p" | \ |
||||
#Remove things we dont want to show |
||||
sed 's/\(bindsym \|--whole-window \|--no-startup-id \|--release \)//g' | \ |
||||
#Hopefully self explanitory |
||||
sort |\ |
||||
#Makes Formats [0-9] |
||||
format0to9 |\ |
||||
#Goes through each line and turns it into simple markdown |
||||
formatLine |\ |
||||
#Converts markdown to groff ms |
||||
#pandoc -f markdown -t ms |\ |
||||
pandoc -f markdown -t latex -o ~/test.pdf |
||||
#Converts groff to pdf |
||||
#groff -ms - -T pdf > ~/test.pdf |
||||
#groff -ms - -T pdf |\ |
||||
#Opens PDF |
||||
#zathura - |
||||
|
Loading…
Reference in new issue