Yours Truly, Famous Inc.
Vitalii Rybka
sudo apt-get install screen
screen
.screenrc
):
# Default is ‘on’, as you probably noticed.
startup_message off
# Window list at the bottom.
hardstatus alwayslastline
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"
sudo apt-get install tmux
tmux
screen |
- Cannot create independent layouts for each tab- Cannot save layouts in case of a connection’s drop- Before 4.1 version couldn’t support vertical separation- Whenever you create a new region, you also need to create a new window (Ctrl+a, c) , then shift to the needed directory, etc- To delete a region, you’d need to press one more key combination Ctrl+a, :remove
|
tmux |
+ Boasts quality default settings out-of-the-box+ No need to customize the arrangement and backlight of the control pane+ Supports both vertical and horizontal splits+ In order to close the pane, you only need to enter exit + Can hold a remote connection by SSH*
|
#!/bin/bash
echo "Hello, world!"
./hw.sh # how it calls
_
.
path="~/Docs"
$path
./script.sh arg1 arg2 arg3 … argN
$1
- first argument$2
- second argument$0
- name of script$#
- count of arguments#!/bin/bash
var1=$1
var2=$2
echo "Arguments are \$1=$var1 \$2=$var2"
./variables.sh var1 var2 # how it calls
if
if/else
if/elif/else
case/in/esac
git diff origin/master origin/%branch% > %path%
fast_diff.sh
-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 array
do
# an action, i on every iteration is getting
# the next value from array
done
upRepo
- final resultgit branch
- how often do you enter this command?
git status
- what about this command?
git push origin %branch-name%
- what about this?
git commit -m 'some comments'
- what about this?
...
.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'
alias showaliases='cat $HOME/.bashrc | grep alias'
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"
can be read here.