Shell single quotes and double quotes

#!/bin/bash

a
=23
echo
'$a'
echo
"$a"

your_name
='runoob'
str
="Hello, I know you are \"$your_name\ "! \n"
echo
-e $str
echo $str

Output

bogon:Desktop macname$ ./test.sh

$a
23
Hello, I know you are
"runoob"!

Hello, I know you are
"runoob"! \n

Reference:

< p>https://www.runoob.com/linux/linux-shell-variable.html

#!/bin/bash

a
=23
echo
'$a'
echo
"$a"

your_name
='runoob'
str
="Hello, I know you are \"$your_name\ "! \n"
echo
-e $str
echo $str

bogon:Desktop macname$ ./test.sh

$a
23
Hello, I know you are
"runoob"!

Hello, I know you are
"runoob"! \n

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5498 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.