resource-agents icon indicating copy to clipboard operation
resource-agents copied to clipboard

Low: use bash in rgmanager/src/netfs.sh rather than clunky sed/grep/cut

Open grooverdan opened this issue 11 years ago • 2 comments

since bash can do find and replace, regex matches and variable extraction lets use it.

grooverdan avatar Dec 16 '14 11:12 grooverdan

$ set -o posix
$ a='proto=x=y'
$ b='#proto=x=y'
$ [ ${a%%=*} == proto ] && echo yes
yes
$ [ ${b%%=*} == proto ] && echo yes
$ 

grooverdan avatar Dec 16 '14 23:12 grooverdan

this is also bash in first line for netfs

grooverdan avatar Dec 17 '14 02:12 grooverdan