Link to home
Create AccountLog in
Avatar of manishfromuk
manishfromuk

asked on

Search for a string

I want to search a string withing another string in  a unix shell script.

e.g

string1='cat dog mouse'
string2='cat dog mouse rabbit'

there should be a loop for string 1 and it should search for all strings in string 2 and it should display me the string not found in string1 e.g rabbit should be shown.

Thanks

Manish
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer