Yours Truly, Famous Inc.
Виталий Рыбка
sudo apt-get install screenscreen
.screenrc):
# Default is ‘on’, as you probably noticed.startup_message off# Window list at the bottom.hardstatus alwayslastlinehardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"
sudo apt-get install tmuxtmux
#!/bin/bashecho "Hello, world!"
./hw.sh # вызов
_.
path="~/Docs""$path" или "${path}"./script.sh arg1 arg2 arg3 … argN"$1" - первый аргумент"$2" - второй аргумент"$0" - имя скрипта"$#" - количество аргументов"$@" - каждый параметр представлен как отдельная строка (слово), т.е. параметры не подвергаются какой либо интерпретации#!/bin/bashvar1="$1"var2="$2"echo "Arguments are \$1=${var1} \$2=${var2}"
./variables.sh var1 var2 # вызов
if
if/else
if/elif/else
case/in/esac
if [[ condition ]]then# an action, if condition is truedone
-z <string> # string is empty
-n <string> # string is not empty
<str1> == <str2> # strings are equal
<str1> != <str2> # strings are not equal
-eq, (==) # equal
-ne, (!=) # not equal
-lt, (<) # less than
-le # less than or equal
-gt, (>) # more than
-ge # more than or equal
-e <path> # path is exist
-f <path> # is file
-d <path> # is directory
-s <path> # file size more than 0
-x <path> # file is executable
! # denial of boolean expression
&& # boolean “and”
|| # boolean “or”
for/in
while
for i in arraydo# действие, переменная i каждый раз принимает# следующее значение из arraydone
upRepo - финальный вид командыgit branch - как часто вам приходиться набирать эту команду ?
git status - а эту команду ?
git push origin %branch-name% - а эту команду ?
git commit -m 'some comments' - а эту команду ?
...
.bashrc, .gitconfig
alias gst='git status'alias gf='git fetch'alias ghide='git stash'alias gshow='git stash pop'alias gmom='git merge origin/master' # !!!alias gad='git add'alias grm='git rm'
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"можно почитать тут.