I am supporting two groups. I have one script, and I would like to keep it at one. I am having trouble with a test function:
convtype=./Sample*/ if [[ -n convtype ]]; then
where it runs fine for some users but not others. The one thing I've noticed is that for people running it from a PC either a value or Null string is returned depending on what is in the directory, so then my if statement will evaluate to true or false. For MAC users, it always evaluates to a string and therefore is always true.
if I change these two lines to:
if [[ -d Sample*/ ]]; then
if works for the MAC users, but not the PC users.
I'm looking for either a way to tell which type of machine the script is being run from or a different way to generate/test the variable that will work regardless. Suggestions most appreciated.