CMU_20020319-1400
CMU_20020319-1400
1denise: there's like a whole entire industry of
companies that will keep pigeons off your roof so they don't
like poop on your stuff
2juliet: mm-hmm they come out and shoot them or
something
3chek: yeah
4denise: how do they do that do they shoot them
5juliet: or they take them somewhere they like take
them to canada or something oh i don't know
6mty: no that's not why they take them
7denise: they physically remove them i thought they
just put something
8chek:
9wlsadh: like like they they just pick them up and
10mty: your realize the same species is also called
scwab
11denise: scwab
12mty: which is a fine delicacy
13denise: ah i didn't think the killed them I though
they just
14juliet: oh
15mty: if it's it's you know
16denise: put something up there like a scare
pigeon
17juliet: place them somewhere else
18chek: mis- chop 'em and
19denise: ala scarecrow baste them that's rough
20chek: baste them
21mty: sure
22juliet: mm
23juliet: yummy
24denise: man so- unix whoo how about that stuff man
that's some crazy programming isn't it.
25tbc:
26denise: God .
27tbc: ask a question .
28denise: I wish I knew what to a a what did we not
touch on yesterday ?
29mty: y e yeah .
30tbc: well , jeez . I think we we spent forty minutes
covering the basics . we can go into
31mty: SED , AWK . uh Pipes . Pipes and redirection
.
32denise: we really did .
33chek: oh , Pipes .
34denise: y we didn't talk about Pipes .
35juliet: what are Pipes ?
36tbc: pipes are things that are in your house that
uh
37juliet: oh , no . I do I wanna know ?
38mty: yes . th they bring water from one place to
another , much like the Unix Pipe .
39denise: water pipes ?
40denise: is it like a pipe dream ?
41tbc:
42denise: if you dream about Unix , is that a pipe
dream ?
43mty: uhm .. to make a long story short . uh
44tbc:
45denise: can you make it about twenty minutes ? or
actually , eighteen ?
46mty: yes . .. so , a Pipe is a p is a means of
redirecting the output of one program t uh to the input of
another program . so , what is a good example ? so let us say
you have what ?
47juliet:
48wlsadh:
49tbc:
50chek: huh .
51denise: okay .
52tbc: Cat .
53tbc: Cat .
54mty: Cat , yeah . but you don't n ever need to use
Cat , ever . right ? you can just I mean , most most programs
will take StandardIn and you can just redirect StandardIn .
so , for instance , let us say you have like uh .. a table ..
uh that is a flat text file that has like numbers in the
first column , .. words in the second column , and then a
whole bunch of other shit but you only care about the first
two columns and you want them sorted by number . you could
first .. use the Sort program on that file and then Pipe it
to another program that'll just print out the first two
columns . so
55tbc: th th I
56tbc: right , sure .
57tbc: there is a Sort is one . remember we said that
Unix is a collection of uh small programs . Sort is one .
58denise: okay .
59mty: Sort is one of them .
60denise: okay , yeah . .. right on .
61mty: Sort will allow you to sort by pretty much
anything you like .
62tbc: it
63denise: anything you want . .. alphabetical by hat
size .
64tbc: e each command .
65mty: yes , by hat size . that is a
66chek: what is the syntax of of a Pipe command ? cause
I was always I I never use Pipe in Unix but I use Pipes in
uhm in uh like VMS , you know .
67denise: good one .
68mty: program A Pipe program B .
69chek: that is it . there is no .. there is no lot
of
70mty: simple as that . hes provided the programs take
it hes take StandardIn and s and deal with StandardOut . ..
you can also redirect StandardError , of course , with just
uh by adding the ampersand to the Pipe .
71tbc: right .
72juliet: what is standard ? just the norm ?
73mty: so StandardIn is like the terminal . uhm if you
type something to it that is standard input so if it is like
the the overriding concept is a stream . .. there are input
streams and output streams that programs have . StandardIn is
the standard one . it is just it is it is like i it is just
the one that works by default .
74juliet: okay .
75tbc: think think of them as uh three rivers flowing
in parallel . and you have uh
76mty: in , out , and error .
77tbc: right . and you and , they yeah , they just
happen to be called in , out , and error rivers . uhm and you
either are getting you're getting
78mty: just like the Mon , the uh Yough , and the
uh
79denise: Allegheny .
80tbc: Ohio .
81mty: sure .
82tbc: uhm
83denise: Schuylkill . ..
84mty:
85tbc: and you're just you're sending you're sending
information into one river and it is flowing down .. there
and you can only see it if you're looking at that river . and
if you know you're s you put information in another river or
another p a pipe and it flows in there . that is that is all
that is . it is just three different way that you can look at
data .
86denise: name a favorite river .
87mty:
88juliet: okay .
89mty: and another another example of a stream would
actually be a file . so , a program can open a file .. and
that file now becomes the stream . you can read stuff in ..
from it right to it , you know , whatever .
90tbc: yeah .
91tbc: we will just keep adding rivers . sorry . I like
my river analogy .
92mty: yes . well
93mty: well the the ear it is . it is a good one .
94tbc: yeah , cause stream , you know . river , stream
.
95mty: and th the earliest Unixes had a limit , didn't
they ? .. of like , you know , .. ten rivers at a time . was
that ..
96tbc: y oh , yeah .
97tbc: something . you know , it was really small .
98denise: so , what is the craziest Unix command you've
ever typed ? God , I hate this topic .
99tbc: di
100tbc: the crazy .
101juliet:
102mty: it was probably about hes a hundred characters
long but
103denise: woohoo .
104tbc: but it had to be an AWK or a SED . cau i
105mty: it was it used AWK , SED , Perl , Sort , and a
couple other things .
106tbc: yeah .
107denise: God , I'm so sorry I asked . man . .. what
did we talk about yesterday that can .. review ?
108tbc:
109mty:
110juliet: Manfiles , .. those are my favorite . that is
all I had to say .
111denise: Manfiles , they're good .
112denise: I like them cause they're like all ..
userfriendly . .. hey man .
113mty: go Man .
114tbc: there're manual online .
115mty:
116juliet: nice .
117tbc: yeah . there're .. shit .
118chek: what is the different between uhm a List
command and a .. DIR command ?
119tbc: nothing , there're just different .. different
commands , yeah .
120mty: just different flags , yeah .
121chek: so , there is things you could see in a in DIR
that you couldn't see in a List command ?
122mty: oh well
123chek: like you could see file attributes ?
124tbc: no I'm I'm not understanding the question .
125mty: does .. does
126mty: well , yeah . LS has command line options so if
you type LS dash L it'll give you like uh the permissions ,
who owns it , uh how big it is and stuff like that . you know
, hes there is probably how many options are there for LS
?
127tbc: I I guess uh at least a dozen or if not twenty
.
128mty: it is about what I was guessing .
129tbc: yeah .
130mty: yeah . I mean , you know , you can if you want
it .. if you want it if you want your files color coded LS
has an option for that , you know . .. you can list hidden
hes hes dot files . files that begin with a with a dot are
typically hidden but you can find those just by adding a dash
A .
131chek: what is up with dot files ?
132mty: there're just files that .. for one reason or
another you don't wanna .. bother with .
133chek: like system files or configuration files ,
usually ?
134mty: yeah . so , CSHRC is the is the .. the com most
common one , right ? it is just your .. to help set up your
environment . and you know , most users shouldn't .. play
with it , so it is hidden from view . what else ? dot dot
login is another one .
135tbc: dot login , yeah . .. which is same thing for
login . when you login before you get a
136mty: everything in there is executed .
137tbc: right .
138chek: uhm
139mty: so , you know , it is just like just like any
system file that you shouldn't fuck with .. mess with .
140tbc:
141chek: how do you uh what was the problem that we were
having with your little john .
142denise: I don't know . because I wasn't any I was
just watching things .
143chek: what were we trying to do ? like a we're trying
to run we were just trying to c like compile a Perl script
?
144denise: we were trying to tap into a specific machine
but I wasn't being I wasn't
145chek: no . like once we actually got to th where we
were trying to get . we were trying to like X source . what
is X source used for ?
146denise: I don't know .
147mty: X source .
148chek: yeah .
149denise: nobody knows what that is . and apparently
the X wasn't suppose to be there , it was just source .
150mty: you ever heard of this ?
151tbc: yeah , source is the uhm .. what you normally
use .
152chek: what does that command do ?
153tbc: it it reads C . i it executes the fil commands
in a uh in a file . so
154mty: if it is a CSE . if it is like a C shell file or
something .
155chek: oh , like .. so it is like run a batch file
?
156mty: yeah , sorta . though you don't really have to
do that , right ? if you make it execut hes I I only use it
to like uh set shell variables , you know . like I'll source
my path file or my aliases file .
157tbc: yeah .
158chek: what does that do ?
159mty: so , my s my path file just uh sets my path my
search path . and every time I login , I sor I s i it is i it
is sourced automatically . it is part of my login environment
. it is just like
160chek: so th hm
161chek: oh . but I'm saying with the the action of
sourcing , like what does that .. do addit
162mty: it just executes whatever commands are if if
provided there're C shell commands . if you're you know , if
you're in C shell . I mean , so if you like try to source , a
.. you know , a Tcl script or something , it won't do
anything .
163chek: okay . and you
164chek: okay .
165tbc:
166chek: what is Tcl script ?
167mty: uh the script written in Tcl . just a
programming language , yeah .
168tbc: programming language .
169chek: oh .
170denise: right on .
171mty: or , you know , .. it typically won't do
anything unless uh unless it is in the shell language .
172chek: hm
173juliet: uhm when d we were in class we learned about
access rights . is that just a CMU thing or is that a Unix
thing ?
174tbc: no .
175mty: it is a Unix thing . though Andrew the Andrew
file system does have its own stuff on top of that .
176tbc: yeah , it .. Andrew is just wrong .
177wlsadh:
178juliet: oh , no .
179mty: the Andrew file system is .. well it is on its
way out , yeah .
180tbc: yeah .
181chek: is that AFS ?
182mty: yeah .
183chek: okay . Pitt uses that too , yeah ?
184denise: hm yeah .
185mty: lot of lot of schools use it .
186tbc: do they ?
187chek: yeah .
188tbc: that is too bad .
189mty: not only schools but other places , too . well ,
it is being it is slowly being replaced .. by uh what what is
the new one ? Odyssey , I believe . but
190chek: was that developed here ?
191mty: yeah .
192tbc: Andrew ? y yeah .
193mty: hence the name .
194chek: yeah . that is what I figured .
195denise: yeah .
196mty: Coda . Coda . that is the new that is the f the
new file system .
197juliet: okay .
198tbc: I'm sure they'll do things right , too .
199chek: what is wrong about AFS ?
200tbc: it is just the productions are nonse they do
201mty: well the hm yeah , the the protections aren't
right . the access control lists .
202tbc: and some of the commands are just nonstandard .
I mean , it is just it is really uhm
203mty: the FS package .
204tbc: hm yeah . I I I just don't e I try not to use it
as much as possible . .. or use it as little as possible
.
205mty: I I I
206mty: yeah . I mean , it doesn't it is i hes it really
doesn't make any difference to me . I mean , you know , it is
all my my home directory is on AFS . it is transparent as far
as I'm concerned . it is just like any other .. but the
access control lists are strange . it is like so , if you set
your Unix permissions in the standard way , you know , with
CHMod or something like that , it doesn't always have the
effect you think it is gonna have because AFS .. like cares
about other things . I never had any success playing with
access control lists . have you Michael ?
207chek: hm
208chek: hm
209tbc: nope . don't use them .
210mty: super . well , I had to I had to try once .
because we had uh they wanted my uh I forget what it was for
, CPOF probably . I wanted the RCS directory to be in .. I
wanted to be under my protection and like you know , ..
nobody could access it even though I tried to uh .. set all
the permissions properly .
211juliet:
212wlsadh:
213tbc: oh , yeah .
214tbc: yep .
215juliet: we just had to do it for a test . we had to
let our teacher see our answer . and that was that .
216mty: wow .
217denise:
218mty: we would've failed .
219chek: what class was that ?
220juliet: CSW , ComputerSkillsWorkshop .
221denise: it is terrible .
222chek: hm
223juliet: yeah , it wasn't so fun .
224denise: we don't have any general requirements at
Pitt .
225chek: yeah . that is like a standard freshman class
everyone has to take .
226denise: but I mean we
227juliet: it is a six week mini that everyone takes
.
228denise: oh , I'm sorry .
229chek: oh .
230tbc: it is okay . I'll I'll live .
231mty:
232denise: cool . .. we have classes like .. general
writing . but it is easy enough to place out of those .
233mty: a hes
234chek: there is I mean , there is general computer
classes people can take but they're not required .
235denise: yeah .
236mty: yeah so this was from a long time I mean , ..
hes CSW is on its way out , actually .
237denise: hm really ?
238mty: yeah . I mean , when it was first d it was first
done because .. people didn't know how to use Macs .
239juliet: good .
240wlsadh:
241denise: that is beautiful .
242wlsadh: yeah . I didn't I didn't know how to use Macs
until I came here . like so like
243juliet: see we didn't even touch Macs .
244mty: right . hes but of course when when I was an
undergrad here Mac was it .
245tbc: yup .
246denise: that is awesome .
247juliet: I still don't know .