“Verifique se o arquivo contém string bash” Respostas de código

Bash se o arquivo contém string

if grep -q SomeString "$File"; then
  Some Actions # SomeString was found
fi
Witty Wolf

Bash verifique se a string no arquivo

Just use grep with flags 'F' (fixed string), 'x' (exact match) and 'q'
(quiet output) in order to check if a word string is in a file
if grep -Fxq "string" file.txt; then #do some code...#; fi
Armandres

Verifique se o arquivo contém string bash

“check if file contains string bash” Code Answer’s
Difficult Dogfish

Respostas semelhantes a “Verifique se o arquivo contém string bash”

Perguntas semelhantes a “Verifique se o arquivo contém string bash”

Mais respostas relacionadas para “Verifique se o arquivo contém string bash” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código