Skip to content
Advertisement

How to match “whitespace” and “OR” condition with bash script?

I want to match a condition in bash containing “whitespaces” and “OR” condition within strings. I am unable to do as i am new to shell scripting, please help as it going to else loop where it is matching ${myarrlin[1]} . I am getting “Centrify is disabled” but i want the condition to be true here. Here is my code :

JavaScript

nsswitch.conf >>>

JavaScript

Advertisement

Answer

Why are you doing this: myarrlin=($LINE) ?

If you just want to know if the line contains centrify:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement