Command to list all services in systemctl:
systemctl list-unit-files
If you want to filter by enabled:
systemctl list-unit-files --state=enabled
| #!/usr/bin/env bash | |
| # Add all the subnet ID you want to find resources | |
| declare -a subnets=("subnet-id") | |
| echo "Removing all previous data" | |
| rm -rf rds_*.txt ec2_*.txt redshift_*.txt elasticache_*.txt codebuild_*.txt lambda_*.txt | |
| find_rds () { | |
| echo "Finding RDS for $1" |
Command to list all services in systemctl:
systemctl list-unit-files
If you want to filter by enabled:
systemctl list-unit-files --state=enabled
First of all, you must to be updated with your remote.
After that, the command is:
git branch --merged | grep -v "\*" | grep -v master | grep -v dev | xargs -n 1 -I {} git branch -d {}Explanation:
git branch --merged: list only branches merged into HEAD of current branchThe first thing you must to do is create a new repo on GitHub. Do not create it with any file (README, license or gitignore). We can add these files after.
So go ahead:
% echo "# Test project" > README.md
% git init
Initialized empty Git repository in /Users/example/Projects/example/.git/
% git add .