- 2**10 - 1 KB
- 2**20 - 1 MB
- 2**30 - 1 GB
use -base64 flag to generate readable content
| # Accept either empty path or valid path | |
| while [ -z $path_confirm ]; do | |
| read -rp 'Type folder path (relative to current):' folder_path | |
| path_confirm="y" | |
| if [ ! -z $folder_path ] && [[ ! -d $folder_path ]]; then | |
| read -rp 'Path does not exist. Do you want to type it again? [y/n]:' path_confirm |
| if [ "$#" -ne 2 ]; then | |
| echo "Illegal number of parameters" | |
| return | |
| fi | |
| cat $1 | grep -v $2 > "$1_tmp" && mv "$1_tmp" $1 |
| #!/bin/bash | |
| # Example: run_cmd_foreach_line_in_file.sh command file_with_lines.txt | |
| echo Start | |
| while read p; do | |
| $1 $p | |
| done < $2 |
| git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d |
| git for-each-ref --sort=-committerdate refs/heads --format='%(authordate:short) %(color:red)%(objectname:short) %(color:yellow)%(refname:short)%(color:reset) (%(color:green)%(committerdate:relative)%(color:reset))' |
| # Check all page numbers starting 1 until result is empty | |
| curl "https://api.github.com/repos/ORG/REPO/collaborators?per_page=100&page=1" -H "Authorization: Token ACCESS_TOKEN" | \ | |
| jq '[ .[] | select(.permissions.admin == true) | .html_url ]' |