Horje
grep check line exists in file Code Example
grep check line exists in file
grep -F -q -e 'search string' textfile.txt || echo 'Not found'
Note:

-F prevents the interpretation of the search string as a regular expression.
-q suppresses all output and returns immediately after the first instance was found, making the search much faster if the string occurs at the beginning of a large file.
-e specifies the pattern explicitly, allowing patterns that start with a dash.
Use single quotes unless you want variable substitutions.




Shell

Related
start Win-KeX in Seamless mode with sound support Code Example start Win-KeX in Seamless mode with sound support Code Example
find bashrc Code Example find bashrc Code Example
logitech g hub not installing windows 10 Code Example logitech g hub not installing windows 10 Code Example
linux list ifaces Code Example linux list ifaces Code Example
debug ssh server ubuntu command Code Example debug ssh server ubuntu command Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8