e General Eletric • 1969 :: Ken Thompson :: Unics (Assembly) • 1971 :: Ken Thompson :: Rewrites the system on B language (to solve portability problems) • 1973 :: Thompson and Denis Richie :: C programming language • 1974 :: UNIX \o/ • 1983 :: AT&T closes the UNIX's source code • 1983 :: Andrew Tanenbaum :: MINIX • 1984 :: Richard Stallman :: GNU (GCC, Emacs) • 1991 :: Linux Torvalds :: GNU/Linux
variables ◦ PS1 :: Prompt String 1 :: Default interaction ◦ PS2 :: Prompt String 1 :: Continuation interactive prompt ◦ PATH :: contains a list of all the directories that hold commands or other programs you are likely to execute • bash variables are untyped
environment, it is passed into the environment of all child processes • let's go to the terminal ◦ REDU="Redu Tech" ▪ conventionally uppercase ◦ echo $REDU or echo ${REDU} ▪ $ prefix to interpret a shell var ◦ echo "echo \$REDU" | bash
from the terminal’s device file will receive characters typed at the keyboard • When a program is launched, it is automatically provided with three file descriptors ◦ Standard input (abbreviated stdin) :: 0 ◦ Standard output (abbreviated stdout) :: 1 ◦ Standard error (abbreviated stderr) :: 2 • The standard input is different than parameters
▪ tie the output of one program to the input of another ▪ e.g. echo "echo 'Hello Redu'" | bash • Redirection ◦ allows you to manage the origin of input streams and the destination of output streams ▪ > :: Redirection operator ▪ >> :: Append operator ▪ < :: Receive stdin from file
sed is a powerful text editor" | sed 's/sed/awk/' echo "sed tutorial. sed is a powerful text editor" | sed 's/sed/awk/g' echo "sed tutorial. sed is a powerful text editor" | sed 's/sed/awk/2g'
sed '/[pattern]/d [FILE] ◦ sed -i '1 d' [FILE] • Add lines ◦ sed '/[pattern]/ i [text]' [FILE] ◦ sed '/[pattern]/ a [text]' [FILE] ◦ sed "1s/^/[text]" [FILE]