OS UNIX Exercises-4 v1.0
OS UNIX Exercises-4 v1.0
Explain whether these while loops will run: (i) while [5] (ii) while [x$1 != x] If x has a value 10, what is the value of (i) x$x$ (ii) $x$x ? Write a shell s ript that he !s an" reports on who lo#s in an" who lo#s out. Write a s ript that o%pares two "ire tories ar1 an" ar2 (supplie" as ar#u%ents) an" opies or overwrites to &ar1 fro% ar2 ever' file that is either not present in &ar1 or is newer than its na%esa!e in &ar1. )ou are %ovin# files to a han"hel" whi h a epts onl' *+3 t'pe filena%es. ,ro"u e a list of those files in 'our urrent "ire tor' that fail in this test. .ispla' the pro esses in the s'ste% ever' 30 se on"s five ti%es usin# a (i) while loop, (ii)for loop . ,rint onl' the o""0nu%&ere" lines of a file. 1se awk to lo ate lines lon#er than 100 an" s%aller than 1(0 hara ters. Write a shell s ript that uses awk to fin" the total si3e of all or"inar' files owne" &' a user, whose na%e is spe ifie" as ar#u%ent.