Shell Script

Shell script to check domain expiry

Submitted by ravisagar on Tue, 07/12/2022 - 06:32

Do you manage lot of domains and want to ensure that you renew them well before time? Well why not write a simply shell script?

#shell #domainexpiry

Shell script to read file content line by line

Submitted by ravisagar on Wed, 05/25/2022 - 16:39

You can write a very simple short script to read contents from a text file line by line and do wonderful things. I use this quite a lot for bulk updates and save lot of time

#shell #readfile #line

Shell script to get file name and extension

Submitted by ravisagar on Wed, 04/27/2022 - 19:00

When writing shell scripts you may want to fetch the file name and file extension separately without using cut utility. Let us learn how to do that.

#shell #filename #fileextension

Generate timestamps in your shell scripts

Submitted by ravisagar on Sat, 03/19/2022 - 06:53

Let me show you how I save lot of my time when creating new files without specifying the file name, instead I use the timestamp.

#shell #date

Shell script to detect laptop dock status

Submitted by ravisagar on Tue, 12/14/2021 - 17:20

I found a simple way to detect whether my ThinkPad is on the ultrabase dock or not so that I can automatically turn on/off an external monitor or set keyboard layout automatically.

#shell #laptop #dock #ultrabase

Shell script to copy mpd playlist songs

Submitted by ravisagar on Thu, 12/09/2021 - 18:33

I use a very simple one line shell script to copy my songs from an mpd playlist to a usb drive or mobile phone. Take few seconds and it is a great way to sync your songs across devices using your own script.

#shell #mpd #copysongs #readline #whileloop

Shell script to select random wallpaper

Submitted by ravisagar on Wed, 07/14/2021 - 06:24

I use a very simple shell script to select a random file from my wallpaper directory and change the wallpaper.

#ffmpeg #shell #script

Random Wallpaper Shell Script

Submitted by ravisagar on Tue, 07/13/2021 - 18:38

A simple shell script that I use to find a random image from a directory and change the wallpaper.

Ravi Sagar Newsletter

Honestly I hardly send out mails but I guess there is no harm in at least having a newsletter. I will only send newsletter when I have something important to share or an update. People are busy and no one has time to read emails these days. If you really like my content then I guess you will remember my site and come back for more.

Want to contact me?