Answers for "echo -n bash"

4

echo with new lines bash

# Using echo
echo -e "Line 1\nLine 2"
echo "Line 1 $HOME expanded
Line 2"
echo 'Line 1 $HOME not expanded
Line 2'

# Similar result, using cat
cat <<EOF
Line 1 $HOME expanded
Line 2
EOF
cat <<'EOF'
Line 1 $HOME not expanded
Line 2
EOF
Posted by: Guest on September-09-2020
3

echo -n bash

echo(1) - display a line of text
Echo the STRING(s) to standard output.
-n    do not output the trailing newline
Posted by: Guest on March-18-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language