ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

sed and awk: changing text and working with columns

Lesson 2.49 minBeginnerDecember 1, 2026

Sign in to read this lesson

grep finds, sed changes, awk calculates with columns. In this lesson we learn to replace a value in a configuration file with one command (sed -i), to delete lines, and to extract and count the columns we need from a log (awk).

What you will learn

  • sed 's/old/new/' replaces the first match on each line, s/old/new/g replaces all of them.
  • sed -i changes the file itself; check without -i first, then keep a backup with -i.bak.
  • sed '/pattern/d' deletes matching lines, sed -n '5,10p' shows only lines 5–10.
  • awk '{print $1}' prints the first column; -F: changes the delimiter, NR is the line number, NF the number of columns.
  • Conditions like awk '$3 >= 1000' and calculations like {s+=$5} END {print s} are possible.

The lesson has 5 key points, an explanation and 5 questions. It opens with a package.