File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change
1
+ * .txt
2
+ .DS_Store
3
+ .vscode /
Original file line number Diff line number Diff line change 1
- bash_stuffs
1
+ Some helpful bash scripts for my personal use
2
+
3
+ I love JS so I was tempted to find a JS friendly terminal however there is just something so cool about bash scripting!
Original file line number Diff line number Diff line change
1
+ # This script kills all active Docker containers.
2
+ # Use with care!
3
+
4
+ # This strips the Header
5
+ docker ps | grep [a-e0-9] > docker.txt
6
+
7
+ # Just grab container ID
8
+ awk ' {print $1}' docker.txt > docker_ids.txt
9
+
10
+ while read DOCKER_ID
11
+ do docker kill " $DOCKER_ID "
12
+ done < docker_ids.txt
13
+
14
+ # clean up created resources
15
+ rm docker.txt
16
+ rm docker_ids.txt
17
+
18
+ echo " DONE..."
19
+
20
+ docker ps
You can’t perform that action at this time.
0 commit comments