Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I figured out a solution myself. You can use two echo commands to print the two strings separately, where the -n option is used for the first string to prevent the insertion of a trailing newline ...
#2: Post edited
- I figured out a solution myself.
You can use two `echo` commands to print the two strings separately, where the `-n` option is used for the first string to prevent the insertion a trailing newline at the end:- ```shell
- $ var='test\'
- $ echo -n $var; echo '\e[41mNOTE\e[0m'
- ```
- 
- I figured out a solution myself.
- You can use two `echo` commands to print the two strings separately, where the `-n` option is used for the first string to prevent the insertion of a trailing newline at the end:
- ```shell
- $ var='test\'
- $ echo -n $var; echo '\e[41mNOTE\e[0m'
- ```
- 
#1: Initial revision
I figured out a solution myself. You can use two `echo` commands to print the two strings separately, where the `-n` option is used for the first string to prevent the insertion a trailing newline at the end: ```shell $ var='test\' $ echo -n $var; echo '\e[41mNOTE\e[0m' ``` 