Answer: The input from a pipe can be combined with the input from a file . The trick is to use the special symbol "-" (a hyphen) for those commands that recognize the hyphen as std input.In the above command the output from who becomes the std input to sort , meanwhile sort opens the file logfile, the contents of this file is sorted together with the output of who (rep by the hyphen) and the sorted output is redirected to the file newfile.
Tags:Interview Questions, Operating System, UNIX,
Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.
Sponsor Advertisement
Library Management System Software
Our Library Management Softare offers complete library management modules and automation solution that enables information providers, information managers, resource incharge, resource managers & librarians to manage & disseminate information & resources....
No comments:
Post a Comment