-
Sh! Silence your bash scripts by coding your own --silent flag
-
Source code listing for the Lions' Commentary in PDF and PostScript
-
bash : 기초 : 셸의 역사, 종류 profile 참고
-
When did I run that command? Update your Bash prompt with the command start time
-
This Will Make You a Command-Line Ninja | by Erik van Baaren | Towards Data Science
-
A Simple Productivity Hack Using Bash Scripts | by Sebastian Scholl | The Startup | Medium
-
Upgrading Bash on macOS. One thing that many macOS users don’t… | by Daniel Weibel | ITNEXT
-
13 Tips & Tricks for Writing Shell Scripts with Awesome UX | by Joseph Matthias Goh | codeburst
-
What exactly was the point of [ “x$var” = “xval” ]? – Vidar's Blog
-
- ${var}, ${#var}, ${var/bear/panda}, ${var:-othervar}, ${var:?some error}, ${var#pattern}, ${var%pattern}, ${var:offset:length}
-
Shell Scripting for DevOps | Zero 2 Hero Part-2 | Shell Scripting Interview Q&A | #devops - YouTube
-
argument
-
array
-
bc
-
echo "100 / 3" | bc -l
orbc -l <<< '100 / 3'
How do I use floating-point division in bash? -
echo $1 + $2 | bc
Addition of two floating point numbers using shell script -
<cmd> | paste -sd+ - | bc
Bash command to sum a column of numbers - Stack Overflow e.g. grep 'meeting *' | awk '{print $4}' | paste -sd+ - | bc
-
-
dictionary, hash table
-
expr
-
for
-
popd
-
pushd
-
quote
-
stdin
-
string
${#VAR_NAME} string length ${VAR_NAME##*[delimiter]} remove before delimiter ${VAR_NAME%[delimiter]*} remove after delimiter
-
example
$ TEST=some_string.ext $ echo ${TEST##*_} string.ext $ echo ${TEST%.*} some_string $ cat my_script.sh THE_DAY_BEFORE_YESTERDAY=`date '+%Y%m%d' --date '2 days ago'` YYYYMMDD=${1:-$THE_DAY_BEFORE_YESTERDAY} echo $YYYYMMDD echo ${YYYYMMDD:6:8} echo ${YYYYMMDD::${#YYYYMMDD}-2} $ ./my_script.sh 20170116 16 201701
-
Advanced Bash-Scripting Guide: Chapter 10. Manipulating Variables
-
if [[ $string = *"My long"* ]]; then
String contains in Bash -
uppercase first character in a variable with bash
-
${foo^}
capitalize -
${foo^^}
uppercase all the letters -
${foo,}
lowercase only the first letter -
${foo,,}
lowercase all the letters
-
-
[ -z "$var" ] && ... || ...
Test for non-zero length string in Bash
-
miscellaneous
CUR_DIR=$(readlink -f $(dirname $(readlink -f ${BASH_SOURCE[0]}))) current directory
-
while
- Alternative Shells · oilshell/oil Wiki
- abs | Home of the ABS programming language: the joy of shell scripting
- aviary.sh: Minimal distributed configuration management in bash
- BASH with Debugger and Improved Debug Support and Error Handling
- bashhub - Bash History in the Cloud
- Bash Infinity - a standard library and a boilerplate framework for writing tools using bash
- Bash Quick References
- .bashrc generator: create your .bashrc PS1 with a drag and drop interface
- 터미널에서 프롬프트에 표시되는 PS1을 쉽게 만들어 주는 웹사이트
- bashttpd - a simple, configurable web server written in bash
- commit.sh: Generate commit message according to AngularJS Commit Message Conventions
- dotdrop: Save your dotfiles once, deploy them everywhere
- hishtory: Your shell history: synced, queryable, and in context
- Hush - a unix shell based on the Lua programming language
- import - a simple and fast module system for Bash and other Unix shells
- Oil
- only-stackoverflow: 구글, 덕덕고 검색에서 stackoverflow 짝퉁 사이트 숨기기 (Adblock, adguard, uBlock Origin, etc...)
- osh Four Features That Justify a New Unix Shell
- ShellCheck finds bugs in your shell scripts
- Sherlock.py - transpiler that translate python to shell script language
- transfer.sh - Easy and fast file sharing from the command-line.
- tsk-tsk: TSK - The Scripting Kit
- zenity How to Modernize Your Bash Scripts By Adding GUI | by Shalitha Suranga | The Startup | Sep, 2020 | Medium
- zx: A tool for writing better scripts