grep -qxF 'your text "additional text"' yourfile.txt || echo 'your text "additional text"' >> yourfile.txt
Related[edit]
See also[edit]
ack, ag, grep
, egrep, fgrep
, agrep
, ngrep
, pgrep
, awk
, sed
, strings
, tr
, tail
, mtail
, git grep
, wc
, uniq
, LogQL
, findstr (Windows)
, rg, git-grep, cut