More very useful shell tricks for using Ubuntu in 2022.

How to clear the screen in your terminal in a shell script. ┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Music/Youtube] └─$ printf ‘\33c\e[3J’┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Music/Youtube] └─$ printf ‘\33c\e[3J’ Just execute the printf statement and this will clear the screen. This will also clear the scrollback buffer as well. This is another way to accomplish this task. ┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Music/Youtube] └─$ printf "\ec"┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Music/Youtube] … Read more

How to check image dimensions using the command-line on Linux.

It is very easy to check image dimensions using the command line. Install the exiv2 package and this allows easy retrieval of image information. Just like this. ┌──(john㉿DESKTOP-PF01IEE)-[/mnt/c/Users/Intel i5/Pictures/phone5] └─$ exiv2 ui_icon_equipment.png File name : ui_icon_equipment.png File size : 8626195 Bytes MIME type : image/png Image size : 4096 x 4096 ui_icon_equipment.png: No Exif data … Read more

Very nice Bash shell prompt I came up with.

This is a very nice bash shell prompt I came up with. PS1="▩\[\033[38;5;33m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;79m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;174m\]\w\[$(tput sgr0)\]\n┗╼╼╼╼> \[$(tput sgr0)\]\[\033[38;5;82m\]\v\[$(tput sgr0)\] ┋► \[$(tput sgr0)\]\[\033[38;5;36m\]\\$ \[$(tput sgr0)\] \[$(tput sgr0)\]"PS1="▩\[\033[38;5;33m\]\u\[$(tput sgr0)\]@\[$(tput sgr0)\]\[\033[38;5;79m\]\H\[$(tput sgr0)\]:\[$(tput sgr0)\]\[\033[38;5;174m\]\w\[$(tput sgr0)\]\n┗╼╼╼╼> \[$(tput sgr0)\]\[\033[38;5;82m\]\v\[$(tput sgr0)\] ┋► \[$(tput sgr0)\]\[\033[38;5;36m\]\\$ \[$(tput sgr0)\] \[$(tput sgr0)\]" This is what this prompt looks like in action. You can use … Read more