> --------------
> Next, shell programming:
> I am just starting to learn a few things about shell programming. I have
> been using bash, but I suppose the are all mostly similar. Anyhow, I want
> to identify substrings in variable and files. I have used grep to some
> success. for example I have this code to find rpm files containg a given
> file name:
>
> if rpm -qpl $FILE | grep $FINDNAME > /dev/null
>
> But, if I have two variables, say VAR1 and VAR2, how can I check and see
> if $VAR1 contains a substring of $VAR2 ?
if echo $VAR2 | grep $VAR1 > /dev/null
hth,
--
robert friberg, ensofus ab
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list