Hi,
using pc_replace of helper .sh I'm struggling to replace text that contains parenthesis characters. Basically my script under /jffs/scripts is working fine, but the processing of text with ( and ) fails.
Example:
I want to replace the entire line of text [entware (at USB-Stick)] by a space (because I can't find a solution to delete the entire line).
So that's my script:
#!/bin/sh
CONFIG=/tmp/etc/smb.conf
source /usr/sbin/helper.sh
pc_replace "[entware (at USB-Stick)]" "" $CONFIG
As result the text keeps completely untouched in smb.conf. I could found out, that the paranthesis have a special meaning in "sed" (I'm not familiar with sed syntax)
Any ideas how to get such text/lines out of the target file?
Thanks
Edit:
If I'm right, there is no other way to make boot-resistent changes to smb.conf - right?
using pc_replace of helper .sh I'm struggling to replace text that contains parenthesis characters. Basically my script under /jffs/scripts is working fine, but the processing of text with ( and ) fails.
Example:
I want to replace the entire line of text [entware (at USB-Stick)] by a space (because I can't find a solution to delete the entire line).
So that's my script:
#!/bin/sh
CONFIG=/tmp/etc/smb.conf
source /usr/sbin/helper.sh
pc_replace "[entware (at USB-Stick)]" "" $CONFIG
As result the text keeps completely untouched in smb.conf. I could found out, that the paranthesis have a special meaning in "sed" (I'm not familiar with sed syntax)
Any ideas how to get such text/lines out of the target file?
Thanks
Edit:
If I'm right, there is no other way to make boot-resistent changes to smb.conf - right?
Last edited: