Results for “to”
Small, practical examples. Search by task or narrow things down below.
Extract a basename without an external process
Bash Scripts: Double hash removes the longest matching prefix ending in a slash.
Bash Scripts✓ 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 JSON field
Read a scalar value from JSON text.
json_extract✓ Tested
Extract a known substring
PowerShell: Substring uses a zero-based starting index and a character count.
PowerShell✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ Tested
Extract a parent path with parameter expansion
Bash Scripts: Percent removes the shortest matching slash-and-suffix portion.
Bash Scripts✓ Tested
Extract a route path variable
Extract a route path variable using a complete Go program with explicit sample inputs.
Go✓ Tested
Extract a section of an Arduino String
Arduino / C: substring includes the start index and excludes the end index.
Arduino / C✓ Tested
Extract a substring by offset and length
Bash Scripts: Bash substring offsets start at zero for an ordinary string.
Bash Scripts✓ Tested