fai-sed(1)
π fai-sed β the manual page, but make it cute
okay bestie, welcome to fai-sed π this is from the General Commands Manual section, and honestly? it's giving "responsible little helper who refuses to touch your file for no reason." iconic behavior fr fr.
πΈ NAME πΈ
fai-sed β call sed on a file but check for changes before writing β¨
π SYNOPSIS π
fai-sed CMD FILE
π« DESCRIPTION π«
So here's the vibe: you run a sed script β we're calling that script CMD in here β on FILE. But!!! it does not overwrite the file if nothing changes. Like, if your sed did absolutely nothing? no write. no timestamp drama. the file stays untouched. periodt. π
If $target is defined, use it as the prefix for the path to FILE. yes literally as a prefix, that's the whole rule π«Ά
Exit status 0 means success, bestie π a nonzero value means failure π (that's the entire definition of the two, no cap).
β¨ OPTIONS β¨
-Eβ iffai-sedchanged the file, exit with9instead of0. yes it's a lil unhinged. it's also exactly what it does π-nβ dry run π§ it prints whether the file would have changed, but does not change it. nothing gets touched. main character observation-only energy π
π EXAMPLES π
okay let's see her in action:
$ fai-sed 's/foo/bar/g' /etc/motd
Replace foo with bar in the file /etc/motd. slay π
$ fai-sed 's/123/ABC/g; /XXX/d' /etc/motd
Replace 123 with ABC and delete all the lines that contain the string XXX. two jobs, one command, she ate π₯
π SEE ALSO π
This program is part of FAI (Fully Automatic Installation). See the FAI manual for more information on how to use fai-monitor. The FAI homepage is https://fai-project.org π¦
π AUTHOR π
Thomas Lange <lange@cs.uni-koeln.de> π
that's the whole page, bestie β no notes, no skips, every flag accounted for πΈ and a lil sign-off: this beauty is FAI 5, dated 2020, and she has been serving correct sed behavior ever since πβ¨π«Ά
π¦ where this page comes from
- debian bookworm: fai-client 6.0.3+deb12u1 Β· GPL-2.0-or-later
- debian trixie: fai-client 6.4.3 Β· GPL-2.0-or-later
- ubuntu noble: fai-client 6.0.5ubuntu1 Β· GPL-2.0-or-later
- ubuntu resolute: fai-client 6.4.3ubuntu1 Β· GPL-2.0-or-later
- ubuntu stonking: fai-client 6.6ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms