I generate password from php (thru web page) using shell_exec / dd/ /dev/urandom.
I want to eliminate
"/\
characters from my generated password.
If I do a replacement in my sed line with
's/["/\]/!/g'
the script fails to execute. However I tested this from command line like
echo "this /is \"a \test" | sed -e 's/["/\]/!/g'
Then I get the right result : this !is !a !test
If I eliminate this replacement section from my sed line, php script does execute properly. What seems to be the issue? I thought characters within brackets [] is safe and does not need escaping.. is that the issue?