I'm looking at this short example, and I don't see how this function works:function EXT_COLOR () { echo -ne \[\033[38;5;$1m\]; }AFAIK -ne stands for not equal. What are we comparing here? I only see one variable (string): \[\033[38;5;$1m\]. It looks like it echoes the result of comparison, but there is no variable it compares to.
How does this bash function work?
bash;shell;shell script;dash
-ne only means not equal when it's in an if [  ] statement. In this case -ne is an option to echo. You could just as easily use -en.From bash(1):If  -n  is  specified,  the trailing newline is suppressed.  If the -e option is given, interpretation of the following  backslash-escaped  characters  is enabled.In this example there is no comparison. Just echo.