I do have a bash script. I want to delete a specific string from a text file. I already found a command on the online but it seems it isn't that stable..
I've tried;
mv .admins .adminsold
sed -r "s#${MYFUNCTION}(,|$)##g" <.adminsold >.admins
My input file;
# Admin rule
[[rule]]
# Set your admin Group Ids here, ex: [ 13, 42 ]
groupid = [ 329, 2, 324, 156 ]
# And/Or your admin Client Uids here
useruid = []
# By default treat requests from localhost as admin
ip = [ "127.0.0.1", "::1" ]
"+" = "*"
Expected file;
# Admin rule
[[rule]]
# Set your admin Group Ids here, ex: [ 13, 42 ]
groupid = [ 329, 2, 156 ]
# And/Or your admin Client Uids here
useruid = []
# By default treat requests from localhost as admin
ip = [ "127.0.0.1", "::1" ]
"+" = "*"