Add line
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[edit]
See also[edit]
line,newline,characters,wc, column, Add line, Concatenate lines, Ansible: lineinfile, rpl, sed -i,fold(command)
Advertising: