Comments and echo
# starts a comment. echo prints text, -n skips the newline and -e enables escapes such as \n and \t. printf gives exact formatting.
Example
# comment
echo "one"
echo -n "two "
echo "three"
echo -e "a\tb"
printf "%s is %d\n" Ada 21Result
one two three a b Ada is 21
Exercise
Print without a newline.
echo "x"
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.