The following does not work on my computers:

 

If [ "1" > "2" ]

  then

    echo "greater"

  else

    echo "not greater"

fi

 

Bash thinks this is I/O redirection and creates a file by the name of
"2" in my directory.

This should be a string compare.

 

Thanks,

Sam

 

_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to