Bash way to tell if String is in String
env: SLES9 SP1 intell, KDE
I think I am in BASH, I am in the /etc/profile.local that I created, but I did not put #!/bin/bash at the top, so who knows what it is.
Anyway, I want to export PATH with an appended dir in there. Problem is, I need to know if it is already appended, because it gets appended twice. So how would I do this? I have tried "expr index...", grep wants a file, must be a way. If someone could please post the actual code instead of speaking in vague abstractions, that would be great. A coworker gave me a huge example script involving large functions and arrays and a main, but isn't there an easy way.