What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-02-17 19:05:25
docker kill all containers windows
You could create a batch-file (.bat or .cmd) with these commands in it: @ECHO OFF FOR /f "tokens=*" %%i IN ('docker ps -q') DO docker stop %%i If you want to run this command directly in the console, replace %%i with %i, like: FOR /f "toke... Add solution -
Shell/Bash 2021-08-26 13:04:01
get length of array bash
## define it distro=("redhat" "debian" "gentoo") ## get length of $distro array len=${#distro[@]} ## Use bash for loop for (( i=0; i<$len; i++ )); do echo "${distro[$i]}" ; done Add solution