Quiz Space

Intro to Linux End Term: 13 April 2025, Set QEF3 (January 2025 term)

Question 1

+7 marksOne correct option

file1.txt and file2.txt contains ID, Name of persons. Which of the following command Sort and merge the two files such that:
o The output should contain all the IDs from both files.
o The records should be listed in ascending order of ID.
o If an ID appears in both files, merge the records into one

  1. A
  2. B
  3. C
  4. D

Question 2

+7 marksOne correct option
awk
{
for (i = 1; i <= NF; i++) {
count[$i]++
}
}
END {
n = asorti(count, rcount)
for (i = 1; i <= n; i++) {
print rcount[i], count[rcount[i]]
}
}

What is the primary purpose of this AWK script?

  1. A

    To sort contents of file.

  2. B

    To count the frequency of each word in a file.

  3. C

    To count the number of lines in a file.

  4. D

    To count number of words in a file.

Question 3

+7 marksOne correct option

what does the following script do choose most prominent answer

bash
#!/bin/bash
exclude_commands=("sudo" "history")
get_top_commands() {
cat ~/.bash_history | \
sed 's/^[^a-zA-Z0-9]*//' | \
awk '{print $1}' | \
grep -vE "^(${exclude_commands[@]})$" | \
sort | \
uniq -c | \
sort -nr | \
head -n 5
}
get_top_commands
  1. A

    Finds the first 5 commands from user’s Bash History

  2. B

    Count the frequency of top 5 words in the user’s Bash history.

  3. C

    Find the top 5 unique words from bash history in an alphabetical order

  4. D

    Finds the top 5 most frequently used commands from a user's Bash history

13 more questions in this paper

Sign in with Google — it is free — to see every question with its answer and explanation, practise it in learning mode, or take it as a timed mock test.

More on the Intro to Linux End Term 13 Apr 2025 Set QEF3 paper

The IIT Madras BS Introduction to Linux and Programming (Intro to Linux) End Term paper sat on 13 Apr 2025, in the January 2025 term, set QEF3: 16 questions for 100 marks in 180 minutes. The first 3 questions are below. Sign in with Google — it is free — to see the whole paper with its answers and explanations, in learning mode or as a timed mock test.

FeatureIntro to Linux End Term 13 Apr 2025 Set QEF3 at a glance
TermJanuary 2025 term
SubjectIntroduction to Linux and Programming
Course codeCS1102
Questions16
Marks100
Duration180 min
MCQ9
MSQ5
Numerical2
Official paperIIT M ES FOUNDATION AN EXAM QEF3 13 Apr 2025
Negative markingNo negative marking.
Updated

Other sets that day

Same End Term, other subjects

More Intro to Linux