1,396 views
1 votes
1 votes

Consider the following UNIX command:

sort<in>temp; head-30<temp; nm temp

Which of the following functions shall be performed by this command?

  1. Sort, taking the input from “temp”, prints 20 lines from temp and delete the file temp
  2. Sort eh file “temp”, removes 30 lines from temp and delete the file temp
  3. Sort, taking the input from “in” and writing the output to “temp”, then prints 30 lines from temp on terminal. Finally “temp” is removed
  4. Sort, taking the input from “temp”, and then prints 30 lines from “temp” on terminal. Finally “temp” is removed.

1 Answer

0 votes
0 votes
it should be rm instead of nm

Ans should be C   the head command prints the specified number of lines from the begining (here head-30 so 30 lines are to be read)  rm command used to remove the file .the  symbol > used to redirection of output  and symbol < used to redirect the input
Answer:

Related questions

3 votes
3 votes
1 answer
1
go_editor asked Jul 14, 2016
4,040 views
A virtual memory based memory management algorithm partially swaps out a process. This is an example ofshort term schedulinglong term schedulingmedium term schedulingmutu...
2 votes
2 votes
1 answer
2
2 votes
2 votes
3 answers
3
1 votes
1 votes
1 answer
4
go_editor asked Jul 14, 2016
2,197 views
A test contains 100 true/false questions. How many different ways can a student answer the question on the test, if the answer may be left blank also.$^{100}P_2$$^{100}C_...