scripting

Pygmentize Styles

2020/07/26

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 …

scripting – performance improvement with file open

2020/04/20

Sometimes just one line of code can make all the difference. I will show you with example.  Here is script with 2 functions. Both are writing some lines of text to a file. First function, “a” I have …

i3 – show mapped hotkeys

2019/12/02

Here is a simple script that can show you the hotkeys bound in ~/.config/i3/config :  #!/bin/bash - #=============================================================================== # # FILE: …

scan your network with bash IP scan script

2019/10/10

Here is the youtbe video that will walk you through bash script.  

cool sed/grep magic to convert output to csv format

2019/03/11

I generallly keep doing this a lot, so thought will share with you. Lets assume we are capturing free ouput every min/hour/or whatever. The output looks like this: […] Time: Mon Jan 21 23:59:10 …

Get to your ebooks quickly

2018/11/12

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 …

Generate random string for various use case

2016/08/08

Some times I need random string, for example to use as email seperator or to use in some API. One way is to use tools like /dev/[u]random or od and other such. But they seem cubersome after I figured …

image ordering by Original Date Time using bash script

2016/01/05

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

Get count of lines in scripts (shell)

2015/10/15

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 …

Filename handling with space and newline character.

2010/05/25

<a target="_blank" href="http://www.andreaplanet.com/andreamosaic/download/"> <a …

The power of find command in Linux – advanced.

2010/05/24

Generally whoever uses Linux, would know about the find command. Find the man page <a href="http://amit.themafia.info/phpMan.php?parameter=find&mode=man" …

parse and paste text

0001/01/01

Lot of times, I copy the text but before pasting want to remove a word or make some other changes or add “wget” to the URL, quite common. So, I came up with this alias replace='echo $(xclip -i)|sed …


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