bash script

Get the git url of current repo in clipboard


Lot of times, I just want to copy the git url to clipboard. This is so common in my flow of work that I created an alias for it. Here it is:  

Script to try various themes from kitty terminal


Here is the script. Very simple yet very useful script.

i3 – show mapped hotkeys


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

Add files to dropbox with single curl command


I have been thinking of posting this for sometime now. This is very useful, when you are working on a different Linux box and want to upload a file to dropbox.  So, before you run this command, you …

Split pcap to multiple files based on number of packets


Here is a script that can use tshark to split a large pcap to multiple small pcaps  inpcap="test.pcap" max=$(tshark -r $inpcap -n -T fields -e frame.number|tail -1) # This is the number of packets in …

libvirt- Create virtual machine with text console only interface


virt-install is an amazing tool to create VMs. If you have created a config file (Kickstart file – ks.cfg), then its only one line un-attended install. If you are using this on remote host with ssh …

Port php mysql scripts to php 7.0 from 5.x version


Recently I got a script or series of scripts that were written for PHP 5.6x and hence used mysql_connect which as you know by now does not work with PHP 7.0. Since there were number of scripts, I …

send mail using telnet from script


If you have no other option but to use telnet with authentication to send mail 🙂

ansible with docker dynamic inventory


So, I have a few dockers. Every now and then I want to run some command on all of them. Doing ‘docker exec’ is tiresome. I found this neat solution with ansible that I thought I should share with you. …

Trello – backup to your linux machine


Just in case, you are looking for backing up your trello account boards, you can use the following bash script to do so:  #!/bin/bash - …

Get your local IP address like pro


In shell scripts if you need to get you local IP address corresponding to your hostname then you can use this command

email with templates (with variables) from the command line with sendmail or any other MTA.


I was trying to get templates to work on evolution and found that although templates are there in evolution mail client, its not that efficient to use. What I thus wanted was to have something that …

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