I have a command find "$PWD" -name __openerp__.py|awk -F/ -vOFS=/ 'NF-=2'|sort -u and I want to take a certain line containing /web/addons and push it to the front of output then do the same with /openerp/addons making so that line with /openerp/addons would be first and line with /web/addons would be second.
I figured to use grep with that input and from the same output - grep with wildcard and exclude, but yet to figure out how to pass pipe output to multiple greps. Also there is probably multiple ways of doing this.
So right now I get:
<my path>/addons
<my path>/development
<my path>/external
<my path>/server/openerp/addons
<my path>/web/addons
And I want it to become:
<my path>/server/openerp/addons
<my path>/web/addons
<my path>/addons
<my path>/development
<my path>/external
P.S. Reversal of sort will not solve this