.\" Hey, EMACS: -*- nroff -*- .TH fai-sed 1 "2020" "FAI 5" .SH NAME fai-sed \- call sed on a file but check for changes before writing .SH SYNOPSIS .B fai-sed .RI "CMD FILE" .SH DESCRIPTION Execute a sed script - here called CMD - on FILE but do not overwrite the file if nothing changes. If $target is defined, use it as prefix for the path to FILE. The exit status 0 indicates success. A nonzero value indicates failure. .SH OPTIONS .TP .BI \-E If fai-sed changed the file exit with 9 instead of 0. .TP .BI \-n Dry run. Print if file would have changed, but do not change it. .P .SH EXAMPLES .br $ fai-sed 's/foo/bar/g' /etc/motd Replace foo with bar in file /etc/motd. $ fai-sed 's/123/ABC/g; /XXX/d' /etc/motd Replace 123 with ABC and delete all lines which contain the string XXX. .br .SH SEE ALSO .br 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. .SH AUTHOR Thomas Lange