Answered Questions

  • Construct pipes to execute the following jobs?

    1. Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list.2. Output of ls should be displayed on the screen and from this output the lines containing the word ‘poem’ should be counted and the count should be stored in a file. 3. Contents of file1 and file2 should be displayed on the screen and this output should be...

    praveen

    • Apr 11th, 2014

    1. Output of who should be displayed on the screen with value of total number of users who have logged in displayed at the bottom of the list. Ans: who | tee users.txt && who | wc -l 2. Output of ls...

    santosh

    • Mar 20th, 2012

    Who;echo "Total number of users: "`who|wc -l`

  • Explain the steps that a shell follows while processing a command?

    After the command line is terminated by the key, the shel goes ahead  with processing the command line in one or more passes. The sequence is well defined and assumes the following order.Parsing: The shell first breaks up the command line into words, using spaces and the delimiters, unless quoted. All consecutive occurrences of a space or tab are replaced here with a single space.Variable evaluation:...

    athotaashok

    • Feb 21st, 2006

    When processing a command the searchs for the utility for the command in the directories specified in the PATH varible and it in invokes that utility. That utility will execute the command with help of kernel and the output is given to shell. And then the displays out put to the user.