Question
Question1: What is a foreground process and a background process?? What are the roles of following commands? Test them and paste the example in the
Question1: What is a foreground process and a background process?? What are the roles of following commands? Test them and paste the example in the document.
- ps
- kill
- fg
- bg
- &
PART-II
Using pipes in UNIX
Standard Input and output devices
Every programs normally have some input and some output. In other words, some data has to be entered and some kind of analysis will come out afterwards. The input to a program might come from a file, or might be typed in to the program by the user. The output might appear on the screen, be sent to a file or to a printer.
Programs for UNIX are usually written as though input is typed in by the user, and output appears on the screen.
PIPE & REDIRECTION:
The symbol | (vertical bar) is the Unix pipe symbol that is used on the command line.
> is used to redirect the output to a file
< is used to take input from a file
Try :
$cat > weather.txt
^z
To do:
- Run the command cat weather.txt | wc
- Explain the output
- Run the following command and explain its functioning
$ who > current_users
- Give an example each of pipes and redirection operators from your own understanding. (test it and show result)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started