Tagged: Text Processing
11 posts · browse all tags
-
Text Processing for Network Engineers Part 11: Tracing a Bad ACL Across the Fleet, Start to Finish
A maintenance-window ACL push goes out to 150 branch firewalls. A subset break. This part ties every tool from the series together, regex, grep, sed, awk, vim, diff, find and xargs, to find the affected devices, understand why only some of them broke, and fix all of them correctly in one pass.
-
Text Processing for Network Engineers Part 10: Encoding, Line Endings, and the Gotchas That Break Your Scripts
Every tool in this series assumes plain Unix text. A config pasted from Windows, pulled over a serial console, or exported by an older device's SNMP agent frequently isn't, and the failure it causes looks exactly like a bug in your pattern instead of what it actually is.
-
Text Processing for Network Engineers Part 9: find, xargs, and Safe Bulk Operations Across a Config Tree
Turning "run this check against every config backup from the last 24 hours" from a manual loop into a single composable pipeline, and the null-byte-delimited habit that stops a filename with a space in it from quietly breaking your script.
-
Text Processing for Network Engineers Part 8: diff, patch, and Comparing Configs Before You Push
Unified diff format, comparing whole config-backup trees with diff -r, and generating a patch once and applying it fleet-wide. Plus why a generic line-by-line diff eventually needed a config-aware tool built specifically for FortiGate syntax.
-
Text Processing for Network Engineers Part 7: nano and Picking the Right Editor for the Job
nano won't win a features argument against vim, and that's fine. On-screen keybindings, no modal editing to fight under pressure, and the $EDITOR variable that decides which one opens when crontab or visudo calls for an editor.
-
Text Processing for Network Engineers Part 6: vim on a Box With No GUI
Macros, visual block mode, and the :g command: the vim features that matter when you're editing a config on a jump box at 3am with nothing but a serial console and no GUI in reach.
-
Text Processing for Network Engineers Part 5: cut, sort, uniq, tr, and the Rest of the Supporting Cast
grep, sed, and awk get all the attention, but the tools that glue them into a working pipeline are cut, sort, uniq, tr, column, and paste. Building a top-talkers report and a unique-source-IP list from a flow log using nothing but these.
-
Text Processing for Network Engineers Part 4: awk and Turning Command Output Into Reports
Fields, records, BEGIN/END blocks, and associative arrays: turning raw show-command and syslog output into bandwidth totals, error-rate tables, and per-source counts without a single line of Python.
-
Text Processing for Network Engineers Part 3: sed and Editing Configs Without Opening a Single File
Substitution, address ranges, in-place edits with a safety net, and the one command that turns "change this IP across 200 saved configs" from an afternoon of find-and-replace into a single line.
-
Text Processing for Network Engineers Part 2: grep and Searching Configs and Logs at Scale
grep past -i and -v: context windows for pulling whole interface blocks, -o for extraction, -P for lookaheads, and recursive search across a folder of device config backups to find which boxes still reference a decommissioned server.
-
Text Processing for Network Engineers Part 1: Regex, the Pattern Language Everything Else Depends On
Before grep, sed, awk, or vim make any sense, you need the pattern language underneath them. This part covers regex through network examples: IPv4/IPv6, MAC addresses, VLAN tags, interface names, and the BRE/ERE/PCRE dialect trap that bites people moving between tools.