Amazing new shooter game that runs in awk.
An amazing 3D FPS shooter game written in Gawk. Truly amazing.
Read MoreAn amazing 3D FPS shooter game written in Gawk. Truly amazing.
Read MoreHow to list all users on your Linux system using awk. This is very easy to do.
Read MoreHow to use AWK to parse Apache server logs.
Read MoreHow to easily parse Apache server logs and get useful information.
Read MoreHow to list all users in the /etc/passwd file that match certain criteria.
Read MoreGet the IPv6 address of a website very easily with this simple one-liner. jason@. PWD: ~. -bash. 3.2.57. 29 $> host ipv6.google.com | awk ‘FNR==2 {print $5}’ 2404:6800:4006:811::200ejason@. PWD: ~. -bash. 3.2.57. 29 $> host ipv6.google.com | awk ‘FNR==2 {print $5}’ 2404:6800:4006:811::200e This works just fine to get the required…
Read MoreThis very nice one-liner will print some information about your mounted drives on Linux and also print a column header to dress up the output. ┌──[[email protected]]─[~/Downloads] └──╼ ╼ $ df -Hla | grep "[0-9]% /" | awk -F, ‘NR==1 {print "Device","Capacity","Free","Usage","Percentage","Mount"} {gsub(/"/,""); print $1,$2,$4}’ | column -t Device Capacity Free…
Read MoreAwk and bash are a very good combination for extracting certain text strings from a text file or the output of a program. Here I am extracting only the values that are surrounded by square brackets. 4.4 Mon Jan 27 jason@Yog-Sothoth 0: $ lspci | awk -vRS="]" -vFS="[" ‘{print $2}’…
Read MorePrinting user information such as the username and home directory for each user on your system is very easy with awk. Use this simple post to get this information. This will help you out if there are a lot of users on your system and you wish to list them all.
Read MoreThis is yet another way to get the actual IP address of your Linux machine on a LAN. This returns just the IP address of your Linux computer. jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet / { print $2 }’ | sed -n 2p 192.168.1.4/24jason@jason-Lenovo-H50-55:~$ ip a | awk ‘/inet /…
Read MoreReading a large text file and then finding all words that contain between 5 and 7 vowels. Notice I am not using cat. jason@Yog-Sothoth:~/Documents$ egrep ‘^([^aieou]*[aieou]){5,7}[^aieou]*$’ < pg768.txt | wc -l 284jason@Yog-Sothoth:~/Documents$ egrep ‘^([^aieou]*[aieou]){5,7}[^aieou]*$’ < pg768.txt | wc -l 284 Count the number of times a single word appears in…
Read MoreA useful awk implementation to count the number of entries in the /etc/passwd file. john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34john@deusexmachina:~$ sudo awk -F: ‘{ print $1 }’ /etc/passwd | wc -l 34 And the quintessential “Hello World” in Awk. john@deusexmachina:~$ awk ‘BEGIN {…
Read MoreThe sed command is very useful for searching and replacing text in a file. This is how to search for and replace a text string in a file. Homer@bejiitas ~ $ sed -i ‘s/<main>/<mein>/gi;’ my.cHomer@bejiitas ~ $ sed -i ‘s/<main>/<mein>/gi;’ my.c This is how to search and replace text in…
Read MoreThe search and replace dialog in Gedit. I have used this to convert a comma-delimited file to a newline delimited file. I had saved a huge long list of IP addresses that I had to put into the ban list on my forums, and the list was comma-delimited, but the…
Read More