Hi all,
I want to grep two or more values i gone through this link
http://www.cyberciti.biz/faq/searching-multiple-words-string-using-grep/
but it is using or.. i mean either of the words if the grep finds it will output.. but my req is both the words should be present..
Coming to my requirement.. i have to check all the below packages are installed or not..
samba
samba-swat
system-config-samba
samba-common
samba-client
depending on the packages installed i have to install remaining packages..
Here is my code..
but this code is not conforming what samba packages are installed..Code:rpm -qa | grep samba if [ $? -eq 0 ] then echo "Samba package is there.. Now configuring winbind.." config_samba;
Any help on this will help a lot..

Reply With Quote
