I've written myself a linux program
program that needs a regular expression as input.
I want to call the program in the
bash shell and pass that regular expression as a command line argument to the program (there are also other command line arguments). A typical regular expression looks like
Unfortunately the characters
| are special characters in
bash. Thus, calling
program [abc]\_[x|y] anotheragument
doesn't work. Is there a way to pass the expression by using some sort of escape characters or quotation marks etc.?
program "[abc]\_[x|y] anotheragument" isn't working either, because it interprets the two arguments as one.)