Results for “command substitution”
Small, practical examples. Search by task or narrow things down below.
Set an image’s default command
Use JSON array syntax for a predictable command.
Dockerfile✓ Tested
Start a command with a minimal environment
Linux Commands: Use env -i with an explicit PATH for a controlled child environment.
Linux Commands✓ Tested
Turn on the LED with a serial command
Arduino / C: Wait for the character 1 in Serial Monitor before turning on the built-in LED.
Arduino / C✓ Tested
Validate a complete numeric serial command
Arduino / C: Check for digits, an end pointer, and an application-specific range.
Arduino / C✓ Tested
Add calendar days with GNU date
Linux Commands: Anchor date arithmetic at a fixed UTC date to avoid local daylight-saving ambiguity.
Linux Commands✓ Tested
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
Append a new member to an uncompressed tar
Linux Commands: Use tar -r for an existing uncompressed archive; compressed tar files cannot be appended this way.
Linux Commands✓ Tested
Append a stream to a log file
Linux Commands: Use tee -a to preserve existing log contents.
Linux Commands✓ Tested
Archive filenames safely with null delimiters
Linux Commands: Use find -print0 with tar --null to preserve spaces and embedded newlines in filenames.
Linux Commands✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Check an external process exit status explicitly
PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.
PowerShell✓ Tested
Check the integrity of a gzip stream
Linux Commands: Use gzip -t to verify a compressed file without extracting it.
Linux Commands✓ Tested