this is important shell programs in computer practices lab ii covered under anna university
shell's SMPO processFull description
Cement Kiln Shell
Es un proceso de fundición de molde que utiliza una aren cubierta de resina para formar el molde. Se utiliza para pequeñas y medianas piezas que requieren alta precisión. Shell molde de fun…Descripción completa
questions of shell intern online testDeskripsi lengkap
Descrição completa
Bai tap HDHFull description
http%MMsteve5par/er.orgMshMsh.shtml
v1.1 – 7 Aug 2007
UNI / !inu" #hell $heat #heet
File %anipulation
&est 'perators
(ariable #ubstitution
> file >> file >file 2>1 + file a,!
if N "* 5lt "3* O then # do something fi
"$%5def' "$% "$%8d 8def ef' ' "$%&err'
Numeri) &ests
$onditional *"e)ution
lt gt e ne ge le
c1 ,, c2 c1 c2
create (overwrite) file append to file !oth output and errors to file read from file pipe output from -a- as input to -!-
$ommon $onstru)ts while read f do echo ine is "f* done + file
read tet file line !3 line
" grep foo m3file afoo foo foo!ar
find matching lines
less than greater than eual to not eual greater or eual less or eual
File &ests
" cut 5d% 5fQ MetcMpasswd :il!ert
get field with delimiter
foo8PlsP
get output of command
case "foo in a) echo foo is A* !) echo foo is T* ) echo foo is not A or T* es esac dou!leit() epr "1 R 2 ' dou!leit B # returns U
case is a good wa3 to avoid iterating through man3 ifMelifMelifMelif constructs.
function declaration and calling s3nta
nt d f r w
newer than is a director3 is a file reada!le writea!le eecuta!le
#tring &ests
8 4 n
eual to 4ero length not 4ero length
!ogi)al &ests
,, <
logical A9: logical ; logical 9;=
"$ or def* if unset "$ (set (set to def def* * if unse unset) t) "$ or err* if unset
run c1 if it fails run c2 run c1 if it wor/s run c2
$ommon utilities and s+it)hes ls 5lHr ls 5ltr ls 5lh du 5s/ sort 5n ps 5ef wget 6 time cm cmd touch file read cmd , R tee file.tt nice ice cmd cmd
list files !iggest last list files newest last human5reada!le filesi4es director3 si4es (slow) sort numericall3 (not alpha) list m3 commands download 6 stopwatch on on Pc PcmdP create file read * from /e3!oard cmd output to stdout and also to file.tt run cmd cmd with low priorit3
list all networ/ interfaces show routers log in to host as user u* cop3 cop3 file file.t .tt t to host host as user u*
Argument (ariables
,eneral Admin
"0 "1 "2 ... "@ " "#
less file alias l8-ls 5ltar cf t.tar R list?of?files cal B 1@7B df 5h truss 5p CD:
program name 1st argument 2nd ar a rgument ... @th ar a rgument all arguments 9o. of arguments
displa3 file page !3 page create l* as alias for ls 5l* create a tar archive t.tar from the listed dirsMfiles displa3 a calendar (ar 7B) show dis/ mounts show s3scalls of CD:
Files: $ontents / Attributes for i in do echo File is "i* done
A for loop iterates through its input (which is su!Gect to glo!!ing)
Dnternal File Heparator return code from last program what shell ell is running this script& anguage L is 6H Jnglish
aw/ - print "Q '- file sed sMfooM!arMg file
files over 10E! find tet files ls all directories under Mfoo simple maths !etter maths find foo* or !ar* in file print the Qth word of each line replace foo* in file with !ar*
A full PDF and online tutorial is available at http://steve-parker.org/sh/sh.shtm http://steve-parker.org/sh/sh.shtmll