AWK
Building a Linux Habitatwilli glenz @ telegram
Published with SteemPeak
home previous

$ vim ~/.config/fish/functions/gawk.fish
function gawk --description 'awk'
clear; echo
echo '=========================================================================='
echo ' AWK '
echo '=========================================================================='
echo ' # apt install gawk gawk-doc '
echo ' $ dpkg -L gawk-doc | less '
echo ' > file:///usr/share/doc/gawk-doc/gawk.pdf '
echo '--------------------------------------------------------------------------'
echo ' documentation gnu.org/software/gawk/manual/gawk.html'
echo ' tutorial I tutorialspoint.com/awk/index.htm'
echo ' tutorial II tldp.org/LDP/abs/html/sedawk.html'
echo '=========================================================================='
read
clear; echo; echo 'MEMORY '
read; free -h | awk '/^Mem:/ {print "free " $4 " used " $3 " total " $2}' | vim -
clear; echo; echo 'TEMPERATURE '
read; sensors | awk '/^Core|temp1/ {print $0}' | vim -
clear; echo; echo 'USER I '
read; awk -F: '{ print $1 }' /etc/passwd | sort | vim -
clear; echo; echo 'USER II '
read; awk -F: '/root|user1/ { print $0 }' /etc/passwd | vim -
clear; echo; echo 'ENVIRONENT '
read; printenv | awk '/PATH|HOME|USER|SHELL/ {print $0}' | vim -
end
SOURCES
gnu.org .................................... gnu.org/software/gawk/manual/gawk.html
tldp ............................................. tldp.org/LDP/abs/html/sedawk.html
tutorialspoint .................................... tutorialspoint.com/awk/index.htm
picture ....................................... screenshoot by me ~ my gnome-desktop