~/bin
, functions in .bash_profile
... , & aliases
number_of_lines_of_input
X n_in_lines
emacs -nw
then [TAB]
few times to Emac tutorial and hit [ENTER]
)STDIN, STDOUT, SDTERR
- three communication channels available for every process0, 1, 2
< , > , >>
as instruction to reroute standard input/output echo "test" > /tmp/myfile
mailx -s "test mail" itest@cs.nmsu.edu < /tmp/myfile
SDTERR
: >&
(both) or 2>
(only STDERR) find / -mount -name core -ls > /tmp/corefiles 2> /tmp/corefiles_errors
find / -mount -name core -ls > /tmp/corefiles 2> /dev/null
Above is true for bash BUT different shells (csh, tcsh, ..) may behave differently ! :
(find / -mount -name core -ls > /tmp/corefiles_csh) >& /tmp/corefiles_errors_csh
ps aux | grep ssh
cut -d ":" -f 7 < /etc/passwd | sort
cut -d ":" -f 7 < /etc/passwd | sort -u
cut -d ":" -f 7 < /etc/passwd | sort | uniq
cut -d ":" -f 7 < /etc/passwd | sort | uniq -c
mkdir /tmp/foo && cd /tmp/foo
echo $?
mkdir /tmp/foo && cd /tmp/foo
echo $?
mkdir /tmp/foo || cd /tmp/foo
echo $?