Quantcast
Channel: bash – Linux and Photography Blog
Browsing latest articles
Browse All 55 View Live

Image may be NSFW.
Clik here to view.

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...

View Article



Image may be NSFW.
Clik here to view.

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...

View Article

Image may be NSFW.
Clik here to view.

View xml files like a pro

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 xmllint --format - | pygmentize -f 16m...

View Article

Image may be NSFW.
Clik here to view.

ssh trick – ssh to remote host with bastion host

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...

View Article

Image may be NSFW.
Clik here to view.

scan your network with bash IP scan script

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

View Article


Image may be NSFW.
Clik here to view.

Script to try various themes from kitty terminal

Here is the script. Very simple yet very useful script. #!/bin/bash - #=============================================================================== # # FILE: kitty-theme.sh # # USAGE:...

View Article

Image may be NSFW.
Clik here to view.

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:   alias git-url="cat .git/config|awk '/url/ {print...

View Article

Image may be NSFW.
Clik here to view.

using cat with grep – why?

Link to this post!

View Article


Image may be NSFW.
Clik here to view.

scripting – performance improvement with file open

Sometimes just one line of code can make all the difference. I will show you with example.   Here is…

View Article


parse and paste text

Lot of times, I copy the text but before pasting want to remove a word or make some other changes…

View Article
Browsing latest articles
Browse All 55 View Live




Latest Images