I have a situation where I have a dash '-' in a url that I would like
to send via a slack message. I was getting errors saying I cannot do
this.
The %b format flag does this "Print the associated argument while
interpreting backslash escapes in there". This allows you to keep
using \n characters in your messages, but also not try to interpret
any dashes as additional command line arguments!!
I tried a number of other approaches to get this working. The internet will tell you to do printf -- "your-dash-string-here". But that does not work with this version of printf.
I have built the docker image and uploaded it for temporary use here
All tests pass. Sorry I did not add one, crunched on time. If it's a big deal I can get to it later.
I have a situation where I have a dash '-' in a url that I would like to send via a slack message. I was getting errors saying I cannot do this.
The %b format flag does this "Print the associated argument while interpreting backslash escapes in there". This allows you to keep using \n characters in your messages, but also not try to interpret any dashes as additional command line arguments!!
I tried a number of other approaches to get this working. The internet will tell you to do printf -- "your-dash-string-here". But that does not work with this version of printf.
I have built the docker image and uploaded it for temporary use here
All tests pass. Sorry I did not add one, crunched on time. If it's a big deal I can get to it later.
Cheers!