Join Scott Simpson for an in-depth discussion in this video Displaying text with echo, part of Up and Running with Bash Scripting.
One of the most basic commands that you'll use in a batch script is the echo command.…Echo prints out information normally to the standard output.…They can be directed elsewhere.…The syntax for the echo command is pretty simple.…You just type echo, followed by whatever you want to output.…However, there are a couple different things…you should keep in mind about quote marks.…There's three conditions to be aware of…here no quotes, single quotes, and double quotes.…Here's a simple example.…Don't worry about the greeting stuff for now.…
That's a variable and we'll dig into those soon.…If you write a statement with no quotes, Bash…goes along and interprets things as it finds them.…I got an error here, because if you need to…use special characters, you have to escape them with a backslash.…There's also single quotes or strong quotes,…where nothing inside of the quotes gets interpreted.…So everything comes out literally, even if I put a variable…inside, I get back literally what I typed, not the variable.…And finally there's a middle way, using double quotes.…
- What is Bash?
- Managing output with grep, awk, and cut
- Understanding Bash script syntax
- Creating a basic Bash script
- Displaying text with "echo"
- Working with numbers, strings, and arrays
- Reading and writing text files
- Working with loops
- Using functions
- Getting user input during execution
- Ensuring a response
Skill Level Beginner
1. Working with the Command Line
2. Building Bash Scripts
3. Control Structures
4. Interacting with the User
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.