The snippet library.
Small, practical examples. Search by task or narrow things down below.
Print a first terminal message
Linux Commands: Print a first terminal message using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Print separate arguments safely
Linux Commands: Print separate arguments safely using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Read the beginning of piped text
Linux Commands: Read the beginning of piped text using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Read the directory portion of a path
Linux Commands: Read the directory portion of a path using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Read the end of piped text
Linux Commands: Read the end of piped text using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Read the filename portion of a path
Linux Commands: Read the filename portion of a path using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Remove adjacent duplicate lines
Linux Commands: Remove adjacent duplicate lines using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Rename a practice file
Linux Commands: Rename a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Replace text in a pipeline
Linux Commands: Replace text in a pipeline using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Send command output into another command
Linux Commands: Send command output into another command using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Sort a small set of lines
Linux Commands: Sort a small set of lines using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Store and expand a shell variable
Linux Commands: Store and expand a shell variable using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested