Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Operating System (OS) Interviews:BSDBulnexCompiler Linker LoaderDisk Operating System (DOS)MAC Operating SystemNative iOS EngineerOperating System (OS)OS Data StructuresOS General ConceptsOS Memory ManagementOS MultithreadingOS Process ManagementOS X Mountain LionRTOSShell ScriptingSolarisSolaris AdminSolaris CommandsSymbianUnix CommandsUNIX Operating SystemUnix Socket ProgrammingUnix/Linux programmingVxWorksWindowsWindows 7Windows AdministratorWindows CEWindows Programming
Copyright © 2018. All Rights Reserved
Solaris Interview Question:
What is "Piping" solaris?
Submitted by: Administratorpiping:- sending the output of a command to the input of another is called piping.
some examples are:
$cal | wc
will output total line's,word's and character's
$cal | wc | wc
will output total line's,word's and character's
A unix pipe provides a one-way flow of data.
For example, if a Unix users issues the command
$who | sort |lpr
then the Unix shell would create three processes with two pipes between them:
A pipe can be explicitly created in Unix using the pipe system call. Two file descriptors are returned--fildes[0] and fildes[1], and they are both open for reading and writing. A read from fildes[0] accesses the data written to fildes[1] on a first-in-first-out (FIFO) basis and a read from fildes[1] accesses the data written to fildes[0] also on a FIFO basis.
When a pipe is used in a Unix command line, the first process is assumed to be writing to stdout and the second is assumed to be reading from stdin. So, it is common practice to assign the pipe write device descriptor to stdout in the first process and assign the pipe read device descriptor to stdin in the second process. This is elaborated below in the discussion of multiple command pipelines.
Submitted by: Administrator
some examples are:
$cal | wc
will output total line's,word's and character's
$cal | wc | wc
will output total line's,word's and character's
A unix pipe provides a one-way flow of data.
For example, if a Unix users issues the command
$who | sort |lpr
then the Unix shell would create three processes with two pipes between them:
A pipe can be explicitly created in Unix using the pipe system call. Two file descriptors are returned--fildes[0] and fildes[1], and they are both open for reading and writing. A read from fildes[0] accesses the data written to fildes[1] on a first-in-first-out (FIFO) basis and a read from fildes[1] accesses the data written to fildes[0] also on a FIFO basis.
When a pipe is used in a Unix command line, the first process is assumed to be writing to stdout and the second is assumed to be reading from stdin. So, it is common practice to assign the pipe write device descriptor to stdout in the first process and assign the pipe read device descriptor to stdin in the second process. This is elaborated below in the discussion of multiple command pipelines.
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.