(B)0[?7h[?1h=Getting file://localhost/sdf/ftp/pub/users/paulr/technical-notes/unix-ed-indent.htmlUNIX-ED-INDENT(7) -- Indentation Reset on Unix Using ed(1) (p1 of 2)paulr.sdf.org BSD Unix Laboratory Report UNIX-ED-INDENT(7)TitleWhitespace Normalization on BSD Unix: Collapsing Runs and Resetting Indentation Using ed(1) and Standard UtilitiesAbstractWe fix whitespace and indentation problems manually using standard Unix utilities, learning each tool as we go. Two tasks are covered: collapsing runs of whitespace into a single  space, and resetting drifted indentation in text and HTML files back to a clean baseline. The tools are ed(1), sed(1), tr(1), awk(1), and expand(1) -- all present on any Unix or BSD ntal text-processing operation in Unix system administration, source code maintenance, and document preparation. Two forms are routinely  required: collapsing, in which any run of one or more whitespace characters is replaced by a single space; and indentation reset, in which the leading whitespace on each line is  stripped and optionally replaced with a canonical indent.  The BSD base system provides four tools suited to these operations without any package installation: ed(1), the original Unix line editor; sed(1), the stream editor; tr(1), the  character translator; and awk(1), the pattern-scanning language. Each operates differently on whitespace, and the correct choice depends on whether line boundaries must be crossed,  whether the edit must be in-place, and whether POSIX portability is required [1]. ed by automated tools or pasted between editors. Indentation drifts when lines  are added interactively in ed(1) without awareness of the current nesting level. The standard POSIX character class [[:space:]] covers the full set of whitespace characters:  horizontal tab (HT), vertical tab (VT), form feed (FF), carriage return (CR), and space (SP) [2]. This experiment quantifies each tool's effectiveness for both normalization tasks.II. Materials and Methods A. Equipment  BSD Unix System -- FreeBSD 14.0-RELEASEBase system only; no ports or packages installed beyond the default distribution. Shell: /bin/sh (POSIX sh, ash-derived). All commands invoked from a login shell over SSH orat the console. ed; present on all BSD and Linux systems.  sed(1) -- BSD stream editorReads input line by line, applies substitution expressions, writes to stdout. The -i '' flag (BSD sed) enables in-place editing by creating a temporary file and renaming it.  tr(1) -- character translatorMaps characters at the byte-stream level; uniquely able to process newline characters without line-at-a-time restrictions. The -s flag squeezes repeated characters in theoutput class to a single instance, making it the natural tool for collapsing runs. 6  Arrow keys: Up and Down to move. Right to follow a link; Left to go back.  H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list -- press space for next page --2 e using the output fieldseparator (OFS, default single space), collapsing all inter-field whitespace.  expand(1) / unexpand(1)Convert between tab characters and space sequences. expand -t 4 replaces each tab with four spaces; unexpand -t 4 reverses the operation. Required as a pre-processing stepwhen input files use mixed tab/space indentation.  cat(1) with -A flag (GNU) / -e -t flags (BSD)  Reveals invisible whitespace characters: BSD cat -e marks line endings with $; cat -t renders tab characters as ^I. Used to verify input file whitespace composition beforenormalization.  Test Files  Three plain-text and HTML source files of 20-80 lines each, constructed to contain representative mixtures of tabs, multiple spaces, carriage returns, and inconsistent  indentation depth. B. Procedure -- Whitespace Collapsing Output was captured to a second file and diffed against the expected result (every run of whitespace replaced by  exactly one space, count not preserved).  1. Inspect the file for whitespace composition  Before editing, identify what kinds of whitespace are present. On BSD, cat -e marks line endings and cat -t shows tabs:  cat -e file.txt # $ marks every line ending; \r\n appears as ^M$  cat -t file.txt # ^I marks tab characters  2. Collapse using tr(1) -- recommended for cross-line whitespace  tr -s squeezes; the POSIX class [:space:] covers all whitespace including newlines:  tr -s '[:space:]' ' ' < file.txt > collapsed.txt  Note: this flattens the entire file to one line if newlines are present. To collapse only horizontal whitespace while preserving line structure, restrict the class:  tr -s '[:blank:]' ' ' < file.txt > collapsed.txt through unchanged.  3. Collapse using ed(1) -- in-place, no temp file  The ed(1) substitution operates line-at-a-time, so newlines are not visible to it. This collapses horizontal whitespace runs within each line and writes back to the original file:  ed -s file.txt <<'EOF'  ,s/[[:space:]][[:space:]]*/ /g  w 3  qEOF  The pattern [[:space:]][[:space:]]* is POSIX BRE for "one or more whitespace characters" (equivalent to [[:space:]]+ in ERE). Each matching run is replaced by a single space.  4. Collapse using sed(1) -- stdout  sed 's/[[:space:]][[:space:]]*/ /g' file.txt  For BSD in-place editing, add -i '':  sed -i '' 's/[[:space:]][[:space:]]*/ /g' file.txt  5. Collapse using awk(1) -- field-level  Forcing awk to rebuild each record collapses all inter-field whitespace. Leading and trailing whitespace is also stripped by default field-splitting:  awk '{$1=$1; print}' file.txt CIndentation Reset in ed(1)  When editing HTML interactively in ed(1), indentation drifts because ed has no awareness of document structure. The following procedure restores a clean indent baseline. All .Check current indentation state  Print a range of lines with line numbers to see the current indent:  1,20n <- print lines 1-20 with line numbers  .n <- print the current line with its number  .p<- print the current line without its number  2. Strip all leading whitespace from every line  The anchor ^ matches the start of each line; the class [[:space:]]* matches zero or more whitespace characters; replacing with nothing removes it:  ,s/^[[:space:]]*//  After this command all lines are flush left. This is the reset. Write if satisfied:  3. Apply a uniform indent to all lines  Prepend two spaces to every line:  ,s/^/ /  Prepend one tab to every line:  ,s/^//<- the replacement contains a literal tab character 4  4. Indent or de-indent a specific range 5:  10,25s/^/ /  Remove exactly four spaces of leading indent from lines 10 through 25:  10,25s/^ //  Remove any amount of leading whitespace from lines 10 through 25:  10,25s/^[[:space:]]*// Resolve mixed tabs and spaces before resetting  If the file contains mixed tab/space indentation, normalize to spaces first. From inside an ed session, the ! command runs a shell command and reloads the result:  w <- save current buffer first  ,d<- delete all lines  r !expand -t 4 file.txt <- read back with tabs expanded to 4 spaces  Then proceed with ,s/^[[:space:]]*// to reset.  6. Undo  ed(1) supports a single level of undo with the u command. It reverses the most recent command that modified the buffer. There is no multi-level undo; if multiple commands have been the last saved version:  u undo the most recent buffer change  q quit without writing (ed prompts if unsaved changes exist)  Q quit unconditionally, discarding all unsaved changes  NOTE: ed(1) will print a ? and refuse to quit with q if the buffer has unsaved changes. Type q a second time to force quit, or use Q. Neither q nor Q writes the file; only wdoes.  III. ResultsTable I summarizes the behavior of each tool across both normalization tasks. Input files contained spaces, horizontal tabs, and in some tests carriage returns (\r).  Table I. Tool comparison for whitespace collapse and indentation reset.  Tool Collapses runs Crosses newlines In-place Strips leading WS POSIXtr -s '[:blank:]' Yes No No No Yes  Yes Yes No No Yes  sed s/[[:space:]][[:space:]]*/ Yes No BSD: -i '' No Yes  awk $1=$1 Yes No No Yes (side effect) Yes  ed ,s/[[:space:]][[:space:]]*/ Yes No Yes No Yes  ed ,s/^[[:space:]]*/ No No Yes Yes Yes 5  Table II shows the key ed(1) indentation commands as a quick reference. All are typed at the * prompt inside an active ed session.  Table II. ed(1) indentation reset command reference. d Effect Scope,s/^[[:space:]]*/ Strip all leading whitespace All lines  ,s/^/ / Prepend two spaces All lines  n,ms/^/ / Prepend four spaces (indent one level) Lines n through m  n,ms/^ // Remove four leading spaces (de-indent one level) Lines n through m  n,ms/^[[:space:]]*/ Strip all leading whitespace Lines n through m  1,20n Print lines 1-20 with line numbers Lines 1 through 20  .n Print current line with its number Current line  u Undo most recent buffer change One level only ithout saving (discard all changes) Entire session  Before/after example. Input line with mixed indentation:  BEFORE: "

Hello world.

"  (tab + 2 spaces before

; 4 spaces between words)  AFTER strip+collapse:  step 1 expand -t 4 -> "

Hello world.

"step 2 ,s/^[[:space:]]*/ -> "

Hello world.

"  step 3 ,s/[[:space:]][[:space:]]*/ /g -> "

Hello world.

" IV. Discussion  The choice of tool depends on a single primary question: must the operation cross line boundaries? If the answer is yes -- for example, collapsing a paragraph that was broken across  lines with a hard newline -- only tr with [:space:] handles it directly in a single expression. All other tools are line-at-a-time and require a join step first. A. Why ed for In-Place Editing riginal, and renames the temporary to the original name. This breaks hard links, resets the inode, and is not  POSIX-specified. ed writes directly to the original inode via w: the file's inode number, hard link count, and permissions are unchanged. For files under version control or with  known inode references, ed is the safer choice [3]. B. The awk Field-Collapse Side Effect  awk '{$1=$1; print}' strips leading and trailing whitespace as a side effect of field splitting, then rebuilds the record using OFS (a single space by default). This is convenient  but potentially destructive: it collapses whitespace inside quoted strings and HTML attribute values. Use it only on plain prose, not on structured markup. C. Indentation in HTML Edited with ed  When composing or editing HTML in ed(1), the editor provides no structural awareness -- there is no auto-indent, no bracket matching, no tree view. Indentation is the editor's only to nesting depth. It drifts for two common reasons:  * The a (append) and i (insert) commands enter text verbatim; the user must type leading spaces manually on each line. 6* Pasting pre-indented content from another source introduces a different indent convention (tabs vs. spaces, 2 vs. 4 spaces).  The two-command reset sequence is the practical solution: strip all leading whitespace first (,s/^[[:space:]]*/), confirm the result with 1,20n, then re-apply a uniform indent to  the desired range. Because ed supports one level of undo, the strip step can be reversed immediately with u if the result is wrong.  WARNING. The substitution ,s/^[[:space:]]*/ is destructive across the entire file. Always write a backup first: w backup.html before running any global substitution. The u  command only undoes the single most recent change; it cannot recover from a sequence of edits. D. Handling Mixed Tab and Space Indentation  BSD cat -t reveals tab characters as ^I. If both tabs and spaces appear as indent, normalize to spaces before resetting. The recommended sequence from the shell:  expand -t 4 file.html | sed 's/^[[:space:]]*//' > clean.html  Or entirely within an ed session (write first, then reload via the shell escape):  w,dr !expand -t 4 file.html  After reloading, all leading whitespace is spaces and the reset commands apply uniformly.  V. Conclusion  On a BSD Unix base system, tr -s '[:blank:]' ' ' is the most concise expression for collapsing horizontal whitespace runs while preserving line structure. tr -s '[:space:]' ' '  extends this across newlines at the cost of flattening the file to a single line. For in-place normalization that preserves inode identity, the ed(1) global substitution / /g followed by w is the correct POSIX-portable approach.  For indentation reset when editing HTML in ed(1), the sequence to type is: ,s/^[[:space:]]*/ to strip all leading whitespace on every line, then n,ms/^/ / to re-apply a  four-space indent to the desired range. Use 1,20n at any point to inspect line numbers and current indentation state. If mixed tabs and spaces are present, run expand -t 4 before  any indent operation. ________________________________________________________________________________________________________________________________________________________________________________  References  1. The Open Group. The Single UNIX Specification, Version 4 (POSIX.1-2017). IEEE Std 1003.1-2017. https://pubs.opengroup.org/onlinepubs/9699919799/ SIX Character Classes.3. B. W. Kernighan and R. Pike. The Unix Programming Environment. Englewood Cliffs, NJ: Prentice-Hall, 1984, pp. 73-104.  4. D. Dougherty and A. Robbins. sed & awk, 2nd ed. Sebastopol, CA: O'Reilly Media, 1997.  5. FreeBSD Project. FreeBSD 14.0 Base System Manual Pages: ed(1), sed(1), tr(1), awk(1), expand(1). https://www.freebsd.org/cgi/man.cgi  BSD Unix -- Text Processing UNIX-ED-INDENT(7) Rev. 1.0 -- 2026  Lynx compatible.  Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back. You are already at the end of this document.  Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back. Are you sure you want to quit? (y)   aulr/technical-notes/unix-ed-indent.htmlUNIX-ED-INDENT(7) -- Indentation Reset on Unix Using ed(1) (p1 of 2)paulr.sdf.org BSD Unix Laboratory Report UNIX-ED-INDENT(7)TitleWhitespace Normalization on BSD Unix: Collapsing Runs and Resetting Indentation Using ed(1) and Standard UtilitiesAbstractWe fix whitespace and indentation problems manually using standard Unix utilities, learning each tool as we go. Two tasks are covered: collapsing runs of whitespace into a single  space, and resetting drifted indentation in text and HTML files back to a clean baseline. The tools are ed(1), sed(1), tr(1), awk(1), and expand(1) -- all present on any Unix or BSD document preparation. Two forms are routinely  required: collapsing, in which any run of one or more whitespace characters is replaced by a single space; and indentation reset, in which the leading whitespace on each line is  stripped and optionally replaced with a canonical indent.  The BSD base system provides four tools suited to these operations without any package installation: ed(1), the original Unix line editor; sed(1), the stream editor; tr(1), the  character translator; and awk(1), the pattern-scanning language. Each operates differently on whitespace, and the correct choice depends on whether line boundaries must be crossed,  whether the edit must be in-place, and whether POSIX portability is required [1].  HTML source files are a common target for both operations. Whitespace collapses when files are processed by automated tools or pasted between editors. Indentation drifts when lines dded interactively in ed(1) without awareness of the current nesting level. The standard POSIX character class [[:space:]] covers the full set of whitespace characters:  horizontal tab (HT), vertical tab (VT), form feed (FF), carriage return (CR), and space (SP) [2]. This experiment quantifies each tool's effectiveness for both normalization tasks.II. Materials and Methods A. Equipment  BSD Unix System -- FreeBSD 14.0-RELEASEBase system only; no ports or packages installed beyond the default distribution. Shell: /bin/sh (POSIX sh, ash-derived). All commands invoked from a login shell over SSH orat the console.  ed(1) -- BSD ed, POSIX line editorThe standard line-oriented text editor. Accepts commands from stdin or a here-document. Operates on an in-memory buffer; the w command writes back to the original filewithout a temporary file. POSIX-specified; present on all BSD and Linux systems. nput line by line, applies substitution expressions, writes to stdout. The -i '' flag (BSD sed) enables in-place editing by creating a temporary file and renaming it.  tr(1) -- character translatorMaps characters at the byte-stream level; uniquely able to process newline characters without line-at-a-time restrictions. The -s flag squeezes repeated characters in theoutput class to a single instance, making it the natural tool for collapsing runs. 6  Arrow keys: Up and Down to move. Right to follow a link; Left to go back.  H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list -- press space for next page --2 field whitespace.  expand(1) / unexpand(1)Convert between tab characters and space sequences. expand -t 4 replaces each tab with four spaces; unexpand -t 4 reverses the operation. Required as a pre-processing stepwhen input files use mixed tab/space indentation.  cat(1) with -A flag (GNU) / -e -t flags (BSD)  Reveals invisible whitespace characters: BSD cat -e marks line endings with $; cat -t renders tab characters as ^I. Used to verify input file whitespace composition beforenormalization.  Test Files  Three plain-text and HTML source files of 20-80 lines each, constructed to contain representative mixtures of tabs, multiple spaces, carriage returns, and inconsistent  indentation depth. B. Procedure -- Whitespace Collapsing hitespace replaced by  exactly one space, count not preserved).  1. Inspect the file for whitespace composition  Before editing, identify what kinds of whitespace are present. On BSD, cat -e marks line endings and cat -t shows tabs:  cat -e file.txt # $ marks every line ending; \r\n appears as ^M$  cat -t file.txt # ^I marks tab characters  2. Collapse using tr(1) -- recommended for cross-line whitespace  tr -s squeezes; the POSIX class [:space:] covers all whitespace including newlines:  tr -s '[:space:]' ' ' < file.txt > collapsed.txt  Note: this flattens the entire file to one line if newlines are present. To collapse only horizontal whitespace while preserving line structure, restrict the class:  tr -s '[:blank:]' ' ' < file.txt > collapsed.txt  [:blank:] covers space and horizontal tab only; newlines are passed through unchanged.  3. Collapse using ed(1) -- in-place, no temp file The ed(1) substitution operates line-at-a-time, so newlines are not visible to it. This collapses horizontal whitespace runs within each line and writes back to the original file:  ed -s file.txt <<'EOF'  ,s/[[:space:]][[:space:]]*/ /g  w 3  qEOF  The pattern [[:space:]][[:space:]]* is POSIX BRE for "one or more whitespace characters" (equivalent to [[:space:]]+ in ERE). Each matching run is replaced by a single space.  4. Collapse using sed(1) -- stdout  sed 's/[[:space:]][[:space:]]*/ /g' file.txt  For BSD in-place editing, add -i '':  sed -i '' 's/[[:space:]][[:space:]]*/ /g' file.txt  5. Collapse using awk(1) -- field-level  Forcing awk to rebuild each record collapses all inter-field whitespace. Leading and trailing whitespace is also stripped by default field-splitting:  awk '{$1=$1; print}' file.txt CIndentation Reset in ed(1)  When editing HTML interactively in ed(1), indentation drifts because ed has no awareness of document structure. The following procedure restores a clean indent baseline. All .Check current indentation state  Print a range of lines with line numbers to see the current indent:  1,20n <- print lines 1-20 with line numbers  .n <- print the current line with its number  .p<- print the current line without its number  2. Strip all leading whitespace from every line  The anchor ^ matches the start of each line; the class [[:space:]]* matches zero or more whitespace characters; replacing with nothing removes it:  ,s/^[[:space:]]*//  After this command all lines are flush left. This is the reset. Write if satisfied:  3. Apply a uniform indent to all lines  Prepend two spaces to every line:  ,s/^/ /  Prepend one tab to every line:  ,s/^//<- the replacement contains a literal tab character 4  4. Indent or de-indent a specific range 5:  10,25s/^/ /  Remove exactly four spaces of leading indent from lines 10 through 25:  10,25s/^ //  Remove any amount of leading whitespace from lines 10 through 25:  10,25s/^[[:space:]]*// Resolve mixed tabs and spaces before resetting  If the file contains mixed tab/space indentation, normalize to spaces first. From inside an ed session, the ! command runs a shell command and reloads the result:  w <- save current buffer first  ,d<- delete all lines  r !expand -t 4 file.txt <- read back with tabs expanded to 4 spaces  Then proceed with ,s/^[[:space:]]*// to reset.  6. Undo  ed(1) supports a single level of undo with the u command. It reverses the most recent command that modified the buffer. There is no multi-level undo; if multiple commands have been the last saved version:  u undo the most recent buffer change  q quit without writing (ed prompts if unsaved changes exist)  Q quit unconditionally, discarding all unsaved changes  NOTE: ed(1) will print a ? and refuse to quit with q if the buffer has unsaved changes. Type q a second time to force quit, or use Q. Neither q nor Q writes the file; only wdoes.  III. ResultsTable I summarizes the behavior of each tool across both normalization tasks. Input files contained spaces, horizontal tabs, and in some tests carriage returns (\r).  Table I. Tool comparison for whitespace collapse and indentation reset.  Tool Collapses runs Crosses newlines In-place Strips leading WS POSIXtr -s '[:blank:]' Yes No No No Yes  Yes Yes No No Yes  sed s/[[:space:]][[:space:]]*/ Yes No BSD: -i '' No Yes  awk $1=$1 Yes No No Yes (side effect) Yes  ed ,s/[[:space:]][[:space:]]*/ Yes No Yes No Yes  ed ,s/^[[:space:]]*/ No No Yes Yes Yes 5  Table II shows the key ed(1) indentation commands as a quick reference. All are typed at the * prompt inside an active ed session.  Table II. ed(1) indentation reset command reference. d Effect Scope,s/^[[:space:]]*/ Strip all leading whitespace All lines  ,s/^/ / Prepend two spaces All lines  n,ms/^/ / Prepend four spaces (indent one level) Lines n through m  n,ms/^ // Remove four leading spaces (de-indent one level) Lines n through m  n,ms/^[[:space:]]*/ Strip all leading whitespace Lines n through m  1,20n Print lines 1-20 with line numbers Lines 1 through 20  .n Print current line with its number Current line  u Undo most recent buffer change One level only ithout saving (discard all changes) Entire session  Before/after example. Input line with mixed indentation:  BEFORE: "

Hello world.

"  (tab + 2 spaces before

; 4 spaces between words)  AFTER strip+collapse:  step 1 expand -t 4 -> "

Hello world.

"step 2 ,s/^[[:space:]]*/ -> "

Hello world.

"  step 3 ,s/[[:space:]][[:space:]]*/ /g -> "

Hello world.

" IV. Discussion  The choice of tool depends on a single primary question: must the operation cross line boundaries? If the answer is yes -- for example, collapsing a paragraph that was broken across  lines with a hard newline -- only tr with [:space:] handles it directly in a single expression. All other tools are line-at-a-time and require a join step first. A. Why ed for In-Place Editing riginal, and renames the temporary to the original name. This breaks hard links, resets the inode, and is not  POSIX-specified. ed writes directly to the original inode via w: the file's inode number, hard link count, and permissions are unchanged. For files under version control or with  known inode references, ed is the safer choice [3]. B. The awk Field-Collapse Side Effect  awk '{$1=$1; print}' strips leading and trailing whitespace as a side effect of field splitting, then rebuilds the record using OFS (a single space by default). This is convenient  but potentially destructive: it collapses whitespace inside quoted strings and HTML attribute values. Use it only on plain prose, not on structured markup. C. Indentation in HTML Edited with ed  When composing or editing HTML in ed(1), the editor provides no structural awareness -- there is no auto-indent, no bracket matching, no tree view. Indentation is the editor's only to nesting depth. It drifts for two common reasons:  * The a (append) and i (insert) commands enter text verbatim; the user must type leading spaces manually on each line. 6* Pasting pre-indented content from another source introduces a different indent convention (tabs vs. spaces, 2 vs. 4 spaces).  The two-command reset sequence is the practical solution: strip all leading whitespace first (,s/^[[:space:]]*/), confirm the result with 1,20n, then re-apply a uniform indent to  the desired range. Because ed supports one level of undo, the strip step can be reversed immediately with u if the result is wrong.  WARNING. The substitution ,s/^[[:space:]]*/ is destructive across the entire file. Always write a backup first: w backup.html before running any global substitution. The u  command only undoes the single most recent change; it cannot recover from a sequence of edits. D. Handling Mixed Tab and Space Indentation  BSD cat -t reveals tab characters as ^I. If both tabs and spaces appear as indent, normalize to spaces before resetting. The recommended sequence from the shell:  expand -t 4 file.html | sed 's/^[[:space:]]*//' > clean.html  Or entirely within an ed session (write first, then reload via the shell escape):  w,dr !expand -t 4 file.html  After reloading, all leading whitespace is spaces and the reset commands apply uniformly.  V. Conclusion  On a BSD Unix base system, tr -s '[:blank:]' ' ' is the most concise expression for collapsing horizontal whitespace runs while preserving line structure. tr -s '[:space:]' ' '  extends this across newlines at the cost of flattening the file to a single line. For in-place normalization that preserves inode identity, the ed(1) global substitution / /g followed by w is the correct POSIX-portable approach.  For indentation reset when editing HTML in ed(1), the sequence to type is: ,s/^[[:space:]]*/ to strip all leading whitespace on every line, then n,ms/^/ / to re-apply a  four-space indent to the desired range. Use 1,20n at any point to inspect line numbers and current indentation state. If mixed tabs and spaces are present, run expand -t 4 before  any indent operation. ________________________________________________________________________________________________________________________________________________________________________________  References  1. The Open Group. The Single UNIX Specification, Version 4 (POSIX.1-2017). IEEE Std 1003.1-2017. https://pubs.opengroup.org/onlinepubs/9699919799/ SIX Character Classes.3. B. W. Kernighan and R. Pike. The Unix Programming Environment. Englewood Cliffs, NJ: Prentice-Hall, 1984, pp. 73-104.  4. D. Dougherty and A. Robbins. sed & awk, 2nd ed. Sebastopol, CA: O'Reilly Media, 1997.  5. FreeBSD Project. FreeBSD 14.0 Base System Manual Pages: ed(1), sed(1), tr(1), awk(1), expand(1). https://www.freebsd.org/cgi/man.cgi  BSD Unix -- Text Processing UNIX-ED-INDENT(7) Rev. 1.0 -- 2026  Lynx compatible.  Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back. You are already at the end of this document.  Commands: Use arrow keys to move, '?' for help, 'q' to quit, '<-' to go back. Are you sure you want to quit? (y)