Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
echo "one two three four" | \
sed "s/regex_for_one/substitution_string/" | \
sed "s/regex_for_two/substitution_string/" | \
sed "s/regex_for_three/substitution_string/" | \
sed "s/regex_for_four/substitution_string/"
into something like this...
Code:
echo "one two three four" | \
sed "s/regex_for_one OR regex_for_two OR regex_for_three OR regex_for_four/substitution_string/"
This is a question about syntax, basically. How do I combine regular expressions into and/or groups, given that the above capitalized OR's doesn't work?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.