[root@mttf ~]# head authPerf.conf domain = mttf.appfwk.net testidentity = appfwk1 identityNameTemplate = test password = abcabc adminpassword = abcdef123
PROBLEM: How can I get the RHS of each "="? In other words, how can I get the values of 'domain', 'testidentity', 'password' etc?
SOLUTION: use AWK!
[root@mttf ~]# grep "domain" authPerf.conf | awk -F= '{gsub(/^[ \t]+/ , "", $2); print $2}' mttf.appfwk.net
No comments:
Post a Comment