You are on page 1of 1

UNIX wk 4 - Jan 30 2023

stdout (1)- monitor


stdin (0) - keyboard
stderr (2)
- by default stdout stderr are mapped in the same device
- file handle - numbers in stdout, stdin, stderr

ls - list storage
read - creates a variable. need to use $ symbol to call for the variable
ex
u301263435@d301263435:~$ read line
Goodbye cruel world
u301263435@d301263435:~$ ls -ltr
total 44
-rw-r--r-- 1 u301263435 u301263435 8980 Apr 16 2018 examples.desktop
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Videos
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Templates
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Public
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Music
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Downloads
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Documents
drwxr-xr-x 2 u301263435 u301263435 4096 Jan 27 17:34 Desktop
drwxr-xr-x 3 u301263435 u301263435 4096 Jan 27 18:46 Pictures
u301263435@d301263435:~$ echo $line
Goodbye cruel world

Ctrl D - end of transmission or end of data

while read line ; do echo $line ; done < ls.etc | tail > /dev/pts/2 - this is
entered on the primary terminal and then it will send
the output to the other terminal

tty - shows the directory of termina

You might also like