Join Scott Simpson for an in-depth discussion in this video Tilde and brace expansion, part of Learning Bash Scripting.
…Bash provides some handy shortcuts called expansions.…And you may already be familiar with one of…them even if you don't know what it's called.…If you've ever used the tilde character to…represent your home directory you've used tilde expansion.…The tilde character represents the value of the user's home variable.…The tilde followed by a dash or a minus represents the batch variable called old…PWD, which is the directory that you…were just in, if you've recently changed directories.…There's some other features as well and I encourage you…to check out the documentation on tilde expansion to learn more.…I'll step into the fruit directory here.…
Another handy type of expansion is called brace expansion.…This is written with braces around an expression, and it can…help with repeated commands with different terms or interpolation within a range.…Let's say I wanted to create a bunch of files,…but I didn't want to type each command to do so.…With brace expansion, I can type touch apple, banana, cherry, durian.…
- 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
Linux: Bash Shell and Scriptswith Kevin Dankwardt2h 46m Intermediate
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.