Pygmentize Styles


I have recently started using pygmentize for looking at my code in terminal. A very good and native way to do this is to use pygmentize. If you do not know about pygmentize then […] Highlight …

Get to your ebooks quickly


We are using “rofi” here to show the menu. So, lets first install that cat <<EOF >/etc/yum.repos.d/_copr_yaroslav-i3desktop.repo [yaroslav-i3desktop] name=Copr repo for i3desktop owned by …

change the output format for time command


If you are doing some scripting and using ‘time’ command, then you know sometimes it becomes difficult to capture the output as the output would be something like this: : amit ; time ls real 0m0.002s …

image ordering by Original Date Time using bash script


Here is the script: #!/bin/bash - #=============================================================================== # # FILE: # # USAGE: ./ # # DESCRIPTION: # # OPTIONS: --- # …

How to verify sha256sum for multiple file or one file.


So, lets say you have downloaded the SHA256SUMS files. This file contains the sha256sum for multiple files and you want to compare the values for only one or some of them, then the simplest thing you …

Get count of lines in scripts (shell)


If you have tried to get the count of lines in file, the you would know about “nl” or “wc -l”. But as you are aware these give you number of lines with other details as well and you need to post …

shell script for some quick tests on Linux


Head over to the link and grab the script. Just run it and make yourself a little bit more safe 🙂

script to get hard disk health in fedora/ubuntu


First, put this in a script. #!/bin/bash #Change as appropriate HDD=sda export sub="SmartCtl data for HDD" echo 'To: <Your Email> Sub: [Cron] $sub MIME-Version: 1.0 Content-Type: text/html …

Debuggging bash cron scripts.


I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the …

poor mans watch, watch for solaris


Here is a simple script that you can use as watch in Solaris as well.

Unix shell script for removing duplicate files


The following shell script finds duplicate (2 or more identical) files and outputs a new shell script containing commented-out rm statements for deleting them (copy-paste from here): ::: updated on 02 …

shopt causes bash completion to stop working.


Couple of days, I added some scripts to my bash startup and suddenly realized that bash completions stopped working. This is tricky situation in bash to figure out what went wrong. So, I set my foot …

This website uses cookies to ensure you get the best experience on our website. Learn more Got it