I want to simply run the long command below.
result
But When I run the real variable, I get an error
Result end Error code
In short, can't save such long code as an environment variable?
and If possible, can I know another way?
Bash:
docker ps -a --format "table {{.Images}}\t{{.Ports}}"
Bash:
export view='docker ps -a --format "table {{.Images}}\t{{.Ports}}"'
echo $view
result
docker ps -a --format "table {{.Images}}\t{{.Ports}}"
But When I run the real variable, I get an error
Bash:
$view
Result end Error code
Bash:
"docker ps" accepts no argumets.
See 'docker ps --help'
Usage: docker ps [OPTIONS]
List containers
In short, can't save such long code as an environment variable?
and If possible, can I know another way?