Introduction
Escape characters let you use special symbols or spaces in commands without confusion.
backslash \ followed by the character to escape
cd My\ Documents
echo Hello\ World\!
echo "She said \"Hello\""echo Line1\ Line2
#!/bin/bash # Create a folder with space in name mkdir My\ Folder # List the folder ls My\ Folder # Print a message with special characters echo "This is a dollar sign: \$ and a star: *" # Print a quote inside quotes echo "He said \"Bash is fun!\""
echo Hello\ World\!
/home/user/My Documents in bash. Which command fixes the error caused by the space?Path is C:\Program Files\App. Which command inside the script will produce this output correctly?Pass the test and this pattern moves unknown