You can jump to a line in vi with <line number>G
To jump to a column on the current line, use <column number>|
(pipe character)
A place for John to record his techy notes, both to refer back to when needed, and as a help for others...
You can jump to a line in vi with <line number>G
To jump to a column on the current line, use <column number>|
(pipe character)
This little script is to append a line to a file after a text match, using ex.
This particular one is for /usr/local/etc/sudoers to add a 5 minute timeout to the root sudo.
#!/bin/bash
FILE=$1
cp -p $FILE $FILE.old
ex $FILE <<EOT
/^User_Alias.*UNIX.*wheel
a
Defaults:UNIX timestamp_timeout=5
.
x!
EOT