LINUX Cron Schedule - Newline character issue

we have one simple script that works fine as expected while running it manually. However, it does not work the way it should be when scheduled through CRON. Script:

a="Perform"
b="Test"
output="$a\n$b\n"
echo "$output"

while executing the above script, it should print the values of a and b in two lines. However, when scheduled through CRON it gives the following output:
"Perform\nTest\n".

Can somebody tell why the newline character is not working as expected? Also, let me know how to make it work through CRON schedule.

#!/bin/bash
a="Perform"
b="Test"
echo $a
echo $b

this is script
can u just try this

That's what it ought to be printing all the time. Most versions of echo don't and can't translate \n into newlines. The ones that do, only do so when you ask, by giving it -e.

Try printf "Perform\nTest\n\n" , printf should understand what \n means in any shell.

You could also do:

echo "Perform
Test
"

or

cat <<EOF
Perform
Test

EOF

or in some shells

echo $'Perform\nTest\n'