The snippet library.
Small, practical examples. Search by task or narrow things down below.
Append a line to a practice file
Linux Commands: Append a line to a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Branch on a command’s exit status
Linux Commands: Branch on a command’s exit status using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Check whether two practice files match
Linux Commands: Check whether two practice files match using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Count newline-terminated records
Linux Commands: Count newline-terminated records using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Create a practice directory
Linux Commands: Create a practice directory using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Create an empty practice file
Linux Commands: Create an empty practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Enter and leave a practice directory
Linux Commands: Enter and leave a practice directory using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Extract a field from simple delimited text
Linux Commands: Extract a field from simple delimited text using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Filter lines by literal text
Linux Commands: Filter lines by literal text using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Keep spaces inside one argument
Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Make a second copy of a practice file
Linux Commands: Make a second copy of a practice file using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Prevent expansion with single quotes
Linux Commands: Prevent expansion with single quotes using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested