cat tr pwdx
cat file1 | tr -d ' ' #removes spaces
w | tr a-z A-Z
w | tr ' ' '\t'
list only executable files
ls -F | grep \*$
list folders
ls -F | grep \/$
-----
-----
bash-3.00# cat 1.txt
ro
ot co
nsole Apr 10 15:17 (:0)
root pts/3 Apr 10 15:20 (:0.0)
bash-3.00# cat 1.txt | tr -s '\n'
ro
ot co
nsole Apr 10 15:17 (:0)
root pts/3 Apr 10 15:20 (:0.0)
---------
Three ways to run program
1 bash filename
2 ./filename
3 add working directory in the PATH variable
------
-=-=--=-=--=-=--=-=--=-=--=-=-
Daemons
book
UNIX and Linux System Administration Handbook
-=-=-=-=-=-=-=-=-=-=-=-=
pwdx PID # report current working directory of a process
=-=-=-=-=-=-=-=-
The most obvious difference is that aptitude provides a terminal menu interface (much like Synaptic in a terminal), whereas apt-get does not.
=-=-=-=-=-=-=-=-
User defined functions can be listed with the bash declare command, other shells still use typeset. In bash declare has superceded the typeset command.
declare –f
=-=-=-=-=-=-=-=-=-
ll $(find -name 'file*') | grep file | tr . ' ' | tr // ' ' | tr : ' '
filea
fileb
filec
ll $(find -name 'file*')
./filea:
total 0
./fileb:
total 0
./filec:
total 0
=-=-=-=-=-=-=-=-=-
Note bash script.sh does not need execute permission on script.sh. The file is just read by the shell, technically.
=-=-=-=-=-=-=-=-=
Comments
Post a Comment