I have a simple script called example :
#!/bin/sh echo $'${1}'
Note that using $'' here means converting \n to a new line. ${1} is the first parameter passed to this shell script.
I want to pass a parameter to this script example and print the following:
I tried the following:
example "
Error: -bash: !\n#2.: event not found
Then I tried to escape ! one quote and tried:
example '#1. You're smart\!\n
It outputs:
${1}
Any solution here? Thank you very much!
source share