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 …
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:
Here is the script. Very simple yet very useful script.
Here is the youtbe video that will walk you through bash script.
Lot of times, you have to ssh to a server with bastion host. If you dont know what is bastion host then see this: Now, in such cases, either you add an entry in “~/.ssh/config” to route the ssh …
Viewing XML files can be daunting with tracking mentally where the tag starts and where it ends. So, I ended up with the following alias to help me view xml files
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 …
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 …
Today we will look at the variable GREP_COLORS. This variable determines the colour that is used with the grep command. You can look at the man page of the grep command to see what the various options …
Other day, I was trying to copy the proc folder with following command: tar cvzf /tmp/proc.tgz /proc and I found out that all the files in tar were empty. Strange it may seem but lot of people are …
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 …