+++ SATHISH.J [linux-india] <09/12/01 23:28 +0530>:
> Hi,
> 3.a. cat <filename>|grep <pattern>|wc -l
> NOTE: (if same pattern appears
> more than 1 time on same line the above won't help)
That was for 10 marks? I'd give zero for that solution :) That's a very
useless use of cat and wc ... grep itself can do all this.
grep, grep -c, grep pattern filename ....
> 3.b. tail <file name>
tail -10 filename considering he wanted the last 10 lines. Luckily you
didn't cat the file and pipe to tail? :)
> On Sun, 9 Dec 2001, Yogesh Dhond wrote:
> > 3.(a) Use grep command to find each line of a givenfile that contains some
> > required pattern and displays the number of occurances.10marks
> > (b) Write a command to diplay the last 10 lines in a file.
> > 5. Transalte all the files in uppercase in a particular directory
This last one - man tr
-srs
--
Suresh Ramasubramanian <----> mallet <at> efn dot org
EMail Sturmbannfuhrer, Lower Middle Class Unix Sysadmin
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help