I have posted homework 7 here.
COMMAND [ARGUMENTS] > FILENAME
COMMAND [ARGUMENTS] < FILENAME
COMMAND [ARGUMENTS] >> FILENAME
COMMAND [ARGUMENTS] &
$ sleep 5 &
[1] 17895
$
sleep is a command that makes a program stop running
$ sleep 5 &
[1] 7431
$
[1]+ Done sleep 5
bg commandbg stands for background
$ ./bother.sh
Excuse me
Excuse me
Excuse me
^Z
[1]+ Stopped ./bother.sh
$ bg 1
[1]+ ./bother.sh &
$ Excuse me
Excuse me
Excuse me
jobs
[1]+ Running ./bother.sh &
bg the job numberfg (foreground) command
$ ./bother.sh &
[1] 10575
$ Excuse me
ls
bother.sh sleep_echo.sh
$ Excuse me
Excuse me
fg
./bother.sh
Excuse me
^C
$
fg the job numberkill commandkill you must tell it what to killps (process status)
$ ./bother.sh &
[1] 12444
$ Excuse me
ps
PID TTY TIME CMD
12264 pts/2 00:00:00 bash
12444 pts/2 00:00:00 bother.sh
12447 pts/2 00:00:00 sleep
12448 pts/2 00:00:00 ps
$ Excuse me
Excuse me
kill
$ Excuse me
Excuse me
kill 12444
$
[1]+ Terminated ./bother.sh
$
killjobs command
$ ./bother.sh &
[1] 12543
$ Excuse me
Excuse me
Excuse me
jobs
[1]+ Running ./bother.sh &
$ Excuse me
Excuse me
Excuse me
Excuse me
Excuse me
kill %1
$
[1]+ Terminated ./bother.sh
$