This preview shows page 1. Sign up to view the full content.
Unformatted text preview: More command line tricks
For this as s ignment, we'll be us ing a program written for it c alled b inc alc to perform binary c omputations . Before we c an s tart us ing
it, we need to learn a few more c ommand line tric k s . Program paths
Rec all from Lab 1 that Unix terminal c ommands have the following s y ntax :
rga ag .]
Rec all that many programs tak e files and direc tories as arguments , whic h are written as paths . Relative paths des c ribe how to get
to the file from the c urrent work ing direc tory , while ab s olute paths des c ribe how to find the file from the root direc tory. W hat y ou
may not be aware of is that program c an als o be a path. In fac t, all programs are files that ex is t on the files y s tem jus t lik e
doc uments . You c an s ee where a program is loc ated with the “whic h” program:
hc rga1 .
Try it with the “ec ho” program. W hen I run it, I get “/bin/ec ho”. “bin” is s hort for “binary ”, s inc e, as y ou'll s oon dis c over in this c las s ,
programs are enc ode...
View Full Document
- Fall '14