Question
Six people out of which 3 are brothers and the rest are
strangers are to be seated in a row. Find the number of ways in which all three brothers are not sitting together.Solution
Total number of ways of arrangement = 6! = 720 ways
If we consider 3 brothers as one person, number of ways of arrangement among themselves = 3! = 6 ways
Number of ways of arrangement of remaining 4 people = 4! = 24 ways
Therefore, required number of ways = 720 – (6 × 24) = 576 ways
Which command displays the manual page for another command?
Extended globbing in bash allows:
A Here-Document in shell is denoted by:
Slowly Changing Dimension (SCD) is used to:
Which command is used to check the current working directory in Linux?
Which command is used to make a shell script executable?
Which operator enables process substitution in bash (e.g., diff <(cmd1) <(cmd2))?
Which of the following is the syntax for an `if` statement checking if a variable `NUM` is numerically equal to 5?
Which construct allows embedding a block of text in shell scripts as input?
What is the primary purpose of the "shebang" line `#!/bin/bash` at the beginning of a shell script?