11-06-2002 05:57 AM - last edited on 12-16-2012 07:36 PM by maikoro
I have a depot (say /DEPOT/HP/products) that contains products for HP10.20, HP11 and HP11i. Now I'd like to swlist ONLY products belonging to a specific OS release, eg. all products that have the os_release attribute set to B.11.11.
After having looked at swlist(1M) manpage, I can only retrieve attribute os_release, without testing it.
If I find pattern like os_release = B.11.11, this is perfect. But when I have something like os_release=?.11.*, I cannot test it, as this is not a regexp (the question mark alone does not have the same meaning as 'dot', as interpreted by grep).
So if in a script I want to test B.11.11 against pattern ?.11.*, I don't know how to do it (echo "B.11.11" | grep "?.11.*" fails).
I could test architecture flag, but there are products delivered for B.11.00 that works for B.11.11: some products on 11i application CDs are bundled this way.
If someone could shed a light on this...
P.S. This thread has been moved from HP-UX > General to HP-UX > languages - HP Forums Moderator