File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ delete_line_from_file() {
4949 if [ -f $2 ]
5050 then
5151 sudo sed -i " /$1 /d" $2
52- feedback " deleted $1 from $2 "
5352 fi
5453}
5554
@@ -58,10 +57,8 @@ insert_before_line_in_file() {
5857 # second argument is a partial match of the line we need to find to insert before
5958 # third arument is filename
6059
61- feedback " Inserting $1 before $2 in $3 "
6260 if [ -f $3 ]
6361 then
64- feedback " sudo sed -i '/$2 /i $1 ' $3 "
6562 sudo sed -i " /$2 /i $1 " $3
6663 fi
6764}
@@ -85,7 +82,7 @@ replace_first_this_with_that_in_file() {
8582 sudo sed -i ' /$1/c\$2' $3
8683 return 0
8784 else
88- feedback " Line - $1 not found"
85+ # feedback "Line - $1 not found"
8986 return 1
9087 fi
9188}
@@ -109,7 +106,6 @@ replace_all_this_with_that_in_file(){
109106find_in_file () {
110107 # first argument is what to look for
111108 # second argument is the filename
112- feedback " looking for $1 in $2 "
113109 if grep -q " $1 " $2
114110 then
115111 return 0
@@ -186,7 +182,7 @@ wget_file() {
186182#
187183# ########################################################################
188184create_folder (){
189- if ! folder_exists
185+ if ! folder_exists " $1 "
190186 then
191187 sudo mkdir " $1 "
192188 fi
You can’t perform that action at this time.
0 commit comments