Tag Archives: bash

Flaky WiFi dongle toggle script

After moving to a new place, I had to put my ADS-B handling Raspberry Pi 2B into a cupboard far from any network connection. So I’ve plugged in a cheap USB WiFi dongle and connected it to my WiFi. However, I don’t know whether it’s the dongle or something specific to the RasPi2’s USB implementation,… Read More »

Prompt with 2 directories

bash To only show the last 2 directories in prompt, there are two scripts at the Muffin Research Labs.The best one would be this: Add this to .bash_profile and replace \w by $(PWD) (note the parents!) in your PS1 line in that file. A more comfort version which replaces the home directory by a tilde,… Read More »

bash Tips & Tricks

Bourne Again Shell. bash magic Some handy bash magic. sudo last command If you forgot sudo after executing your 3-lines-command, sudo bang! bang! will repeat the last entered command with sudo prefixed. More parameter magic bang Expands to !$ last argument of previous command !$:p just show last argument of previous command, don’t add to… Read More »