Results for “command substitution”
Small, practical examples. Search by task or narrow things down below.
Configure bounded retries after a failure
Docker / Compose: on-failure with a count limits automatic restart attempts.
Docker / Compose✓ Tested
Confirm the root filesystem rejects writes
Docker / Compose: A read-only root prevents creating files outside writable mounts.
Docker / Compose✓ Tested
Construct a record with named properties
PowerShell: PSCustomObject gives downstream pipeline commands meaningful property names.
PowerShell✓ Tested
Copy a directory’s contents into an image
Docker / Compose: A directory COPY includes its children at the destination.
Docker / Compose✓ Tested
Copy a file into a created container
Docker / Compose: docker cp can copy into a container before its process starts.
Docker / Compose✓ Tested
Copy a file into an image
Include a small application file during the build.
Dockerfile✓ Tested
Copy a file to a folder
Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.
file✓ Tested
Copy an artifact from an earlier build stage
Docker / Compose: A named stage can produce an artifact without copying its other files.
Docker / Compose✓ Tested
Count lines in a file
Count newline characters in a text file, printing only the count without the filename.
lines✓ Tested
Create a compressed tar archive
Bundle a directory into a gzip-compressed tar archive, preserving the directory structure.
tar✓ Tested
Create a directory tree
Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.
directory✓ Tested
Create a network marked for internal connectivity
Docker / Compose: The internal option disables normal external routing for that network.
Docker / Compose✓ Tested