TAG: shell

Bash Mitigate typos and errors in your scripts # Tell bash that it should exit your script if any statement # returns a non true return value: set -e # This will exit your script if you try to use an uninitialized # variable: set -u Some useful bash shell constructs or one liners: ,
Shell Overview: shell index shell
Start & Stop Could be used as a template in /etc/init.d #! /bin/sh ### BEGIN INIT INFO # Provides: skeleton # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Example initscript # Description: This file should be used to construct scripts to be # placed in /etc/init.d. ### END INIT INFO # test -f "/etc/foo.conf" || exit 1 case "$1" in start) echo -n "… ,
Streams, Pipes, Redirects In Linux/Unix everyting is a file. Standard I/O Control input, output and error information via file descriptors: Standard input (stdin) This is the text input stream. It is also known as file descriptor 0. Standard output (stdout)
Tmux tmux is a terminal multiplexer or “window manager” for your terminal * <https://tmux.github.io/> Some basics # create a new session named 'my-session' tmux new-session -s my-session tmux new -s my-session2 # list sessions tmux list-session tmux list-s tmux ls my-session: 1 windows (created Sun Jul 22 18:11:42 2018) [127x96] (attached) my-session2: 1 windows (created Sun Jul 22 18:12:13 2018) [127x96] # switch to other session tmux switch-client -t meine-session2
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready