Tag: awk

Sort by Line Length

Sort file by line length. Original Article… cat /etc/passwd | awk ‘{print length, 0}’ | sort -n | awk ‘{1=””;…

Convent Ico to Gif

This will convert all the ico files in the folder to gif. It uses the final frame of the ico…

Remove Even Lines

This command removes all the even lines from the file given as the argument cat example.txt|awk ‘NR%2==1’

Fish Shell Command History Meme

Use this command if you want to know your command usage stats in the fish shell. grep -v “^\#” “.config/fish/fish_history”|awk…

Better Way to find Process ID of an Application in Linux

A better way to get the process id of an application. I recommend giving an alias for this command… ps…

Fetch columns of Output using Awk

One can use awk to get a specific column from a command output… First column of the command date|awk ‘{print…

Using Awk

Simple uses for awk Get the second column from the output ps aux | awk ‘{print $2}’ Use a different…