| tit | ter | id |
| printf "%.0f" $p2; round up | math | | |
| array=("${array[@]:1}") #removed the 1st element | arr | | |
| ar ave; IFS='+' avg=$(echo "scale=1;(${arr[*]})/${#arr[@]}"|bc) | ar | | |
| compare string ; if test $j != "cmd";then echo $j; fi | str | | |
| d=$(du $j| awk '{print $1}') - remove 4k size file | rm | | |
| if test -d $j && test $j != "cmd";then | if | | |
| ar6=( $(echo ${ar4[@]}|tr " ") ) | tr | | |
| str to arr:IFS=" ";for j in $ar4;do ar5+=($j);done | arr | | |
| q=${ar[j]};if test -z $q;then continue;fi - remove empty el array | arr | | |
| export PATH=$PATH:$cmd/$q | path | | |
| del="";ar=( ${ar[@]/$del} ) - remove empty | arr | | |
| ar=("${ar[@]:1}"): pop 1st el | arr | | |
| a2=( "${ar[@]/$del}" ) | arr | | |
| round up: b1=$(echo $b0|awk '{print int($1+0.5)}') | real | | |
| erro token is "08";n=$(echo $1|sed s/0//g) q=${ar[$n]} | err | | |
| compare: if (( a>b ));then echo $0;fi | math | | |
| r=$(printf "%.0f" $n); float to integer; floor | num | | |
| if test $1 -lt 100 | math | | |
| push 2 - a2+=(a b) | arr | | |
| push el - a2=(new, ${ar[@]} | arr | | |
| pop - array=("${array[@]:1}") | arr | | |
| if not exist; if test -z $q;then $q="z";fi | exist | | |
| dir | | |
| so+=($(printf "%s\n" ${r[@]}|sort -u) );arr el uniq | arr | | |
| if test $(expr $j % 2) -eq 0 | expr | | |
| nohup bash myash.sh > /dev/null & | nohup | | |
| ${str^},${str^^},${str,},${str,,}, | case | | |
| *) echo else;; | case | | |
| for() -> bad for loop; use $(seq 0 $r) | loop | | |
| run par; $cmd & | par | | |
| number of digit - ${#num} | arr | | |
| str1 = str2; str1 == str2 | str | | |
| if dir exists - [ -d dir ] | dir | | |
| n2=(${n[@]: -$l2}) | arr | | |
| $(( )) - math | exp | | |
| test EXP | test | | |
| last val; ${ar[-1]} | ar | | |
| if [ $1 -lt 10 ]then num=0$1; else num=$1; fi | if | | |
| perl - forcing you to alter your thinking processes to fit | bash | | |
| if [ ${#ar[@]} -eq 0 ];then echo null | eq | | |
| if [ $# -eq 4 ];then echo 4; fi | arg | | |
| ${str^^} - up; ${str,,} - low | case | | |
| . ./fn1.sh | func | | |
| override: ls () { command ls -lh } ls | bash | | |
| arr=(${arr[@]},"new") | bash | | |
| for i in {$START..$END} do echo "$i" done | bash | | |
| for ((i=${#arr[@]};i>0;i--)) do echo $i done; reverse array | array | | |
| keys in arr; ${!arr[@]} | array | | |
| arr+=($i) | array | | |
| # if file exists; [ -f "my.file" ];then echo "yes"; | bash | | |
| bash func | bash | | |
| install bash 4.4 | bash | | |
| var comp - bash > 4.3 | bash | | |
| exec bash - source | bash | | |
| bind -m vi-insert "\C-l":clear-screen | bash | | |
| for (( i=1; i<6; i++)); do echo $; done | bash | | |
| if (( $(echo "$xem < 0.2"|bc) ));then | bash | | |
| (( 0 )) -> false | bash | | |
| echo ${stringZ: -4} | bash | | |
| declare -a arr1=($res) | bash | | |
| case ex1 | bash | | |
| nl=$'\n' : add nl to EOF | bash | | |
| BASE=${1%.wav} : del | bash | | |
| for i in $(seq 0 $wc) do echo $i | bash | | |
| leave only 2 char at top | bash | | |
| cd $1 len=${#1} echo $len len2=$(echo $len-1|bc) str1=${1:0:len2} | bash | | |
| for 2 3 5 | bash | | |
| for i in {1..10}; do command; done | bash | | |
| slackpkg function ex1 | bash | | |
| abc->mid->wav scr ex1 | bash | | |
| ctrl + c -> cancel, ctrl + l -> clear | bash | | |
| ctrl + r - reverse-i-search | bash | | |
| for i in {1..5} | bash | | |
| bash eof ex1 | bash | | |
| array length - ${#arr[@]} | bash | | |
| my.sh 1>/dev/null 2>/dev/null | bash | | |
| source in bash is . script.sh, not source! | bash | | |
| cd in bash : use . (source) | bash | | |
| .bashrc ex1 | bash | | |
| array sql ex1 | bash | | |
| ${string:position:length} | bash | | |