In shell scripting found "\n-" and don't know what is it for

Working on UNIX shell scripting I found in env file the following

 export H1="\n- "
 echo "${H1} Waiting for dependencies of ${MONITOR_KEY} to be satisfied ..."  >> ${LOG}
 

What is in shell

 \n-
 

The new line character?

Thanks for contribution

Some versions of echo on certain shells on certain systems will print a newline followed bij a minus sign and a space (in other versions it will print the 4 characters \n- )

1 Like

\n- is a new-line followed by dash space when used in echo/printf (assuming echo supports \n ).
You can always test the hypothesis by creating a "test harness" to mimic....

1 Like