edited by
1,277 views
1 votes
1 votes

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?

  1. cat $* \cdot$ ch $ \: \mid$ wc $-1$
  2. cat $* \cdot [$ c-h $] \: \mid$ wc $-1$
  3. cat $* \cdot [$ ch $] \: \mid$ ls $-1$
  4. cat $* \cdot [$ ch $] \: \mid$ wc $-1$
edited by

1 Answer

0 votes
0 votes

cat *.[ch]|wc-1​​​​​​​ 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.

Option D is the correct Answer

Answer:

Related questions

0 votes
0 votes
1 answer
3
0 votes
0 votes
1 answer
4
makhdoom ghaya asked Jul 10, 2016
1,561 views
Match the following with reference to Unix shell scripts $:$$\begin{array}{clcl} & \textbf{List – I} & & \textbf{List – II} \\ \text{a.} & \text{\$?} & \text{i.} & ...