Show last logins after logging in

Display current open connections, all of today and yesterday’s entries Did a Sunday project today: Print last logins after you connect to your remote machine. https://github.com/LC43/bash-last-logins Can also be used locally. Sorts the last logins, listing their connection times and duration. Also warns you of active connections. The default Message of the Day is hardly…… Continue reading Show last logins after logging in

How to change sound from two sound cards

I have two sound cards. One is the inboard and the other is a USB card. I’m toggling often between them so i created this simple script: (see the end for link to files) #!/bin/bash dir=/home/username/ if [[ “$1” = “-l” ]] || [[ ! -n “$1” ]]; then cat /proc/asound/cards exit fi card=`grep “^…… Continue reading How to change sound from two sound cards

bash un zip all compressed files in a directory

this seems to work for now: for file in *zip; do extdir=`basename “$file” .zip`; unzip -d “$extdir” “$file”; done it will extract all the .zip files into a new directory based on the file’s name. ex: for emacs goodies1.zip it will create a directory called “emacs goodies1” and place all the files there. them proceed…… Continue reading bash un zip all compressed files in a directory