Results for “Bash Scripts”
Small, practical examples. Search by task or narrow things down below.
Explain which ignore rule matches a file
Git: check-ignore -v reports the source file, line, pattern, and matched path.
Git✓ Tested
Export committed files without the Git metadata directory
Git: Git archive creates a snapshot of tracked committed files only.
Git✓ Tested
Extract a compressed tar archive
Extract a trusted gzip-compressed tar archive into a dedicated destination directory.
tar✓ Tested
Extract a delimited text column
Linux Commands: Use cut for simple unquoted delimiter-separated text.
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
Extract a filename from a path
Linux Commands: Use basename with an explicit suffix when removing a known extension.
Linux Commands✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ Tested
Fetch a remote branch
Refresh remote-tracking references before reviewing changes.
fetch✓ Tested
Filter history by its author identity
Git: The author filter selects commits by their recorded author metadata.
Git✓ 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
Find a commit that changed the count of a text string
Git: The pickaxe -S option finds commits that add or remove occurrences of a literal string.
Git✓ Tested
Find branches that contain a selected commit
Git: branch --contains limits the list to branches whose histories include the chosen revision.
Git✓ Tested