AWK as Grep Structure of AWK programs AWK reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed. — Alfred V. Aho[13] An AWK program is a series of pattern action pairs, written as: BEGIN { # init code goes here } # "body" of the script follows: condition 1 or /pattern-1/ { # action1 - what to do with the line matching the pattern? Linux
Colorize linux programs output Learn how to make your Bash/Shell script colourful and attractive without installing any plugins and configuration. Linux Bash Development
7-bit ASCII Character Codes 7-bit ASCII Character Codes The ASCII table contains letters, numbers, control characters, and other symbols. Each character is assigned a unique 7-bit code. ASCII is an acronym for American Standard Code for Information Interchange. Decimal Octal Hex Binary Value Description Carret notation Escape sequence in C 000 000 00 0000 0000 NUL "null" character ^@ \0 001 001 01 0000 0001 SOH start of header ^A 002 002 02 0000 0010 STX start of text ^B 003 003 03 0000 0011 ETX end of text ^C 004 004 04 0000 0100 EOT end of transmission ^D 005 005 05 0000 0101 ENQ enquiry ^E 006 006 06 0000 0110 ACK acknowledgment ^F 007 007 07 0000 0111 BEL bell ^G \a 008 010 08 0000 1000 BS backspace ^H \b 009 011 09 0000 1001 HT horizontal tab ^I \h 010 012 0A 0000 1010 LF line feed ^J \n 011 013 0B 0000 1011 VT vertical tab ^K \v 012 014 0C 0000 1100 FF form feed ^L \f 013 015 0D 0000 1101 CR carriage return ^M \r 014 016 0E 0000 1110 SO shift out ^N 015 017 0F 0000 1111 SI shift in ^O 016 020 10 0001 0000 DLE data link escape ^P 017 021 11 0001 0001 DC1 device control 1 (XON) ^Q 018 022 12 0001 0010 DC2 device control 2 ^R 019 023 13 0001 0011 DC3 device control 3 (XOFF) ^S 020 024 14 0001 0100 DC4 device control 4 ^T 021 025 15 0001 0101 NAK negative acknowledgement ^U 022 026 16 0001 0110 SYN synchronous idle ^V 023 027 17 0001 0111 ETB end of transmission block ^W 024 030 18 0001 1000 CAN cancel ^X 025 031 19 0001 1001 EM end of medium ^Y 026 032 1A 0001 1010 SUB substitute ^Z 027 033 1B 0001 1011 ESC escape ^[ \e 028 034 1C 0001 1100 FS file separator ^\ 029 035 1D 0001 1101 GS group separator ^] 030 036 1E 0001 1110 RS request to send/record separator ^^ 031 037 1F 0001 1111 US unit separator ^_ 032 040 20 0010 0000 SP space ^? Development Linux Linux Utilities
Certbot - Let's Encrypt certificates on Debian server with Apache webserver How install and use certbot on Debian system, examples how create Let's Encrypt certificates for multiple domains, how handling certbot automatic renewal. It covers a apache2 webserver configuration for using cerbot generated certificates. Setup is made for Debian and debian based linux distributions Linux Debian Security Web Servers
phpmyadmin - how recovery error (HY000/1698): Access denied for user 'root'@'localhost' When I try login as a root user to my mariadb (mysql) database in phpmyadmin on my linux debian stretch, I got this error message: mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost' Debian Linux Databases
ProFTPd Server with virtual users and in SFTP mode How to configure proftpd server with virtual users and with sftp mode. Debian Linux Networking Security
Time zone and precise time setting in Linux Properly set system time is important for the user, but also for the system itself. Let's explain how Linux accesses time zones and how to set the exact time to get you right. Linux Debian
nftables geoip - continents ip In the previous articles, we showed how to perform packet marking in nftables based on geoip source ip addresses and also how to log traffic to external files . Today we will show how to mark packets based on which continent they come from. The principle is that we first mark packets based on the source IP address so that we know which countries they are coming from. And then we'll find out which continent the state is on. Linux Security Networking
nftables and GeoIP How to Block IPs from Countries or Continets using NfTables Geoip script We'll learn how we can block traffic originated from specific country or continent IPs using GeoIP database and linux nftables . This article describes the configuration for debian linux distros. nftables is the new packet classification framework that intends to replaces the existing {ip,ip6,arp,eb}_tables infrastructure. In a nutshell: It is available in Linux kernels >= 3.13 It comes with a new command line utility nft whose syntax is different to iptables. Linux Security Networking
How nftables log to external file Logging traffic blocked by the nftables or iptables firewall rules is necessary for debugging the firewall rules and to be alerted to local software problems. Any packet matching a rule can be logged by using -j LOG target for iptables or log statement for nftables. Logging packet has no effect on the packet's disposition, however. The packet must match an accept or drop rule. Linux Security Networking
How to Configure Proxy in Debian/CentOS/RHEL/Fedora Proxies are commonly found on business networks, but they are increasingly becoming popular for personal use. The following tutorial will show you multiple ways of setting your proxy in Linux desktop or servers Linux Networking
How to Change Hostname on Debian Linux This tutorial explains how to change the hostname on Debian or Debian based distro without restarting the system. Debian Linux