Hello People,
Completely unsure if I'm going to offend by asking this in here, so if I'm barking up the wrong tree, be gentle please.
I'm diving into AIX for the first time and need to script up extracting some info from various commands. But AIX has me a bit stumped.
dc1aix13556:/root#lsattr -El sys0 -a modelname
modelname IBM,8408-44E Machine name False
As you can see, the above cmd returns me the model information. From this I just want to extract the 'IBM'.
In Linux, I would just grep what I want with perl regex-fu, retain that, and discard the rest. But AIX doesn't want to play nice. I can't figure out how to match, retain, and discard the rest.
If someone could either assist or just point me in the right direction please, I would be grateful.
#aix #regex
------------------------------
Kyle Lange
------------------------------