Professional Documents
Culture Documents
UNIX Week 4
UNIX Week 4
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
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