Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 5 subjective questions Shell Features

CSE105 — Creative Engineering Workshop 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define pattern matching in the context of the Unix/Linux shell. Explain why wildcards are useful when working with files.

  2. Question 2 of 20

    Explain the use of the * and ? wildcard characters with suitable examples. How do they differ?

  3. Question 3 of 20

    Describe the use of character classes ([...]) in shell pattern matching. Illustrate with ranges and negation.

  4. Question 4 of 20

    Distinguish between wildcards and regular expressions in the Unix shell.

  5. Question 5 of 20

    What is I/O redirection? Explain the three standard file descriptors used by the shell.

  6. Question 6 of 20

    Explain output redirection using > and >>. How do they differ?

  7. Question 7 of 20

    Explain input redirection using < with an example. How is it different from a here-document (<<)?

  8. Question 8 of 20

    Describe how standard error redirection works. Explain how to redirect both stdout and stderr to the same file.

  9. Question 9 of 20

    What is a pipe in the shell? Explain its working with a suitable example.

  10. Question 10 of 20

    Explain pipe chaining (multiple pipes) with an example. How does data flow through the chain?

  11. Question 11 of 20

    Compare pipes with redirection. When would you use each?

  12. Question 12 of 20

    What is the tee command? Explain how it is used with pipes.

  13. Question 13 of 20

    Explain filename expansion (globbing) and the sequence of steps the shell follows to expand wildcards before executing a command.

  14. Question 14 of 20

    Describe various methods to prevent or disable wildcard expansion in the shell. Why is this sometimes necessary?

  15. Question 15 of 20

    Write shell commands (with explanation) to accomplish the following tasks using wildcards, redirection, and pipes:

    1. List all .log files.
    2. Count how many .c files exist.
    3. Save a sorted, unique list of users.
    4. Find the 5 largest files in a directory.
  16. Question 16 of 20

    Explain in detail the working of a pipeline internally, including how the shell uses processes and buffers. Illustrate with a diagram-style explanation.

  17. Question 17 of 20

    Distinguish between >, >>, 2>, &>, and 2>&1 redirection operators with examples.

  18. Question 18 of 20

    Explain the brace expansion {...} feature and how it differs from wildcard character classes [...].

  19. Question 19 of 20

    Discuss common errors and pitfalls when using redirection and pipes, and how to avoid them.

  20. Question 20 of 20

    Design a single command pipeline that reads a web-server access log, extracts the IP addresses, counts how many times each IP appears, and displays the top 3 most frequent IPs. Explain each stage.

That's unit 5

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.