FIND YOUR NEXT FEW LINES

Results for “command substitution”

Small, practical examples. Search by task or narrow things down below.

301 snippets foundClear filters
Linux CommandsDates & process utilities

Format a zero-padded numeric label

Linux Commands: Use printf formatting instead of concatenating a variable number of zeroes.

Linux Commands✓ Tested
Linux CommandsDates & process utilities

Generate a stepped sequence

Linux Commands: Use seq when a command pipeline needs a numeric sequence.

Linux Commands✓ Tested
Linux CommandsFiles & permissions

Handle a filename that begins with a dash

Linux Commands: Use -- to terminate command options before an unusual filename.

Linux Commands✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Identify whether a name resolves to a builtin

Bash Scripts: type -t reports the command kind without printing a machine-specific path.

Bash Scripts✓ Tested
PowerShellCommands & execution context

Inspect a URI through typed properties

PowerShell: The Uri class separates URL components without manual string splitting.

PowerShell✓ Tested
Linux CommandsStreams & byte tools

Inspect bytes as hexadecimal values

Linux Commands: Use od with explicit formatting and no address column.

Linux Commands✓ Tested
Linux CommandsTransforming text

Join lines from two files side by side

Linux Commands: Use paste to pair lines by position with a chosen separator.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Join two sorted files by a shared key

Linux Commands: Use join for sorted, simple delimiter-separated records with one row per key.

Linux Commands✓ Tested
Linux CommandsGetting Started

Keep spaces inside one argument

Linux Commands: Keep spaces inside one argument using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Linux CommandsFinding & selecting files

Limit a search to the immediate directory

Linux Commands: Use maxdepth with type f to exclude nested files and directories.

Linux Commands✓ Tested
Linux CommandsSearching text

List files containing a match

Linux Commands: Use grep -l when only the matching filenames are needed.

Linux Commands✓ Tested
Linux CommandsFiles & permissions

Make a script executable by its owner

Linux Commands: Add the owner execute bit without replacing all permission bits.

Linux Commands✓ Tested