citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

wifis (342B)


      1 #!/usr/bin/env bash
      2 
      3 script=$(cat <<'EOF'
      4 s,--,\n,g;
      5 s,\t[ ]\+,\t,g;
      6 s,ESSID:,,g;
      7 s,",,g;
      8 s,Encryption key:\([^\t]\+\),\1,g;
      9 s,Bit Rates:,,g;
     10 s,^[ ]\+,,g;
     11 s,;,\t,g
     12 EOF
     13 )
     14 
     15 sudo echo hello
     16 
     17 sudo iwlist wlp4s0 scan \
     18     | grep -A6 -i -e key \
     19     | tr '\n' $'\t' \
     20     | sed "$script" \
     21     | sort -u \
     22     | columnt "$@" \
     23     | less -R -S
     24 
     25 
     26