Add line

From wikieduonline
Revision as of 09:57, 19 April 2023 by Welcome (talk | contribs)
Jump to navigation Jump to search


grep -qxF 'your text "additional text"' yourfile.txt || echo 'your text "additional text"' >> yourfile.txt


LINE='include "/configs/projectname.conf"'
FILE='lighttpd.conf'
grep -qF -- "$LINE" "$FILE" || echo "$LINE" >> "$FILE"


Related


See also

Advertising: