Add line

From wikieduonline
Revision as of 13:46, 31 January 2024 by Welcome (talk | contribs) (→‎Related)
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: