bash check if string in file
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
Also in C++:
- ubuntu 20.04 ntfs read only
- ubuntu dot to png
- create a file with text in linux
- how to wait until a triggered pipeline completed gitlabci
- sudo yum install rh-python38
- perl install Switch
- linux find where file is mounted
- git username
- git add submodule branch
- error while installing psycopg2 on ubuntu 20.04
- linux search file in specific folder
- ubuntu install gnote
- curl command
- how to know the shell version in ubuntu
- Sync your Git Fork to the Original Repo
- grep until last match
- react slick typescript
- install node on linux
- pi samba config
- source.list kali linux
- kubectl install ubuntu 20.04
- how to uninstall npm packages
- git move back one commit
- install composer in dockerfile