Forrest logo
back to the dash tool

dash:tldr:23161

dash: Execute specific [c]ommands.
$ dash -c "${echo 'dash is executed'}"
try on your machine

This command runs the dash shell with the -c flag and a specified command.

The dash command is a minimalistic Unix shell that is often used as the default /bin/sh shell on many Unix-like systems.

The -c flag allows you to specify a command to be executed by the shell. In this case, the command is "${echo 'dash is executed'}".

The command within the quotes is an attempt to use variable substitution with the ${} syntax. However, since it is written within double quotes, the ${} syntax is treated as a literal string. Therefore, the command executed by dash will be exactly ${echo 'dash is executed'}.

In essence, the command is trying to execute a dash shell, passing the string ${echo 'dash is executed'} as the command to be executed. However, since the ${} syntax is not expanded correctly in this case, the command will result in an error.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the dash tool