This commit is contained in:
2023-02-11 07:15:30 -05:00
parent e06ab78fc9
commit e7d8431e0e
6 changed files with 41 additions and 9 deletions
+3
View File
@@ -43,6 +43,9 @@ program_exists() {
# return 0 if exists
# 1 not contain string
# 2 file not exist
# when using this function:
# file path should not be quoted but like this:
# file_contains 'abc' file_path
file_contains(){
if [ -f "$2" ]; then
a=`grep "$1" $2`