Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations

UGC NET Computer Science Previous Year Questions (PYQs)

UGC NET Computer Science Unix PYQ


UGC NET Computer Science PYQ
Which of the following UNIX/Linux pipes will count the number of lines in all the files having $.c$ and $.h$ as their extension in the current working directory?





Go to Discussion

UGC NET Computer Science UGC NET PYQ UGC NET Computer Science UGC NET Computer Science June 2019 (Paper II) PYQ

Solution

To select files with extension $.c$ and $.h$, we use the pattern

star dot bracket ch bracket

Here, bracket ch bracket means either $c$ or $h$.

So, it selects files ending with $.c$ and $.h$.

Then, the output is passed to $wc-l$ to count the number of lines.

Therefore, the correct command is:

cat star dot bracket ch bracket pipe wc hyphen l



UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

UGC NET Computer Science


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Limited Seats
× Aspire MCA Promotion

Game Changer NIMCET Test Series 2026

Boost your preparation with mock tests, analysis and rank-focused practice.

JOIN NOW
Ask Your Question or Put Your Review.

loading...