FIND YOUR NEXT FEW LINES

Results for “command substitution”

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

301 snippets foundClear filters
PowerShellCommands & execution context

Restore the working location after an operation

PowerShell: Push-Location and Pop-Location manage a directory stack; finally ensures restoration.

PowerShell✓ Tested
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ Tested
Linux CommandsSearching text

Search for a literal string

Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.

Linux Commands✓ Tested
Linux CommandsSearching text

Search text without case sensitivity

Linux Commands: Use grep -i to match uppercase and lowercase variants.

Linux Commands✓ Tested
Linux CommandsStreams & byte tools

Set a file to a specific byte length

Linux Commands: Use truncate to shorten a known scratch file without replacing its inode.

Linux Commands✓ Tested
Linux CommandsFiles & permissions

Set owner-only file permissions

Linux Commands: Use chmod 600 to allow only the owner to read and write a file.

Linux Commands✓ Tested
Linux CommandsSearching text

Show line numbers beside matches

Linux Commands: Use grep -n so a result identifies its position in the source file.

Linux Commands✓ Tested
Linux CommandsGetting Started

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
Linux CommandsSorting & joining records

Sort lines by numeric value

Linux Commands: Use sort -n so 10 sorts after 2 instead of before it.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Sort records by a delimited field

Linux Commands: Select the exact sort key to avoid including later columns.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Sort values in descending order

Linux Commands: Combine numeric sorting with reverse order.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Sort version-like labels naturally

Linux Commands: Use GNU version sort to compare embedded digit runs numerically.

Linux Commands✓ Tested