CS360 LAB2 Check List WARNING: ZERO points if turn in only the lab2base.c code ZERO points if your code is same as others Make sure you have a LARGE text file such as t.c of YOUR LAB2 C code file 1. Simple commands: 30 points start YOUR mysh program, run the following commnads ls -l # ls LONG format cat t.c # show t.c contents Other Linux commands, e.g. date, mkdir abc, rmdir abc, touch filename Choose an Editor that suits you : emacs, vi, gedit, nano emacs t.c # must be able to edit your file cc t.c # must be able to compile and link your t.c file a.out # run another instance of your mysh program exit # back to the original mysh ==================== if you can do 2, skip 3 and 4 ============================ 2. MULTIPLE pipes with I/O redirection, e.g. 50 points cat < t.c | cat | cat | grep printf > outfile ==================== if you can not do 2 : try 3,4 ============================ 3. I/O redirections: 20 points cat < t.c # cat your t.c file cat t.c > outfile; ls -l # must show outfile same as t.c cat t.c >> outfile; ls -l # must show outfile size doubled 4. PIPES: cat t.c | grep printf # must show the piped outputs 10 points cat t.c | grep printf | more # 2 pipes 20 points =============================================================================== During DEMO, TA will ask you ANY 2 questions: 20 points 1. HOW do you tokenize PATH into dir pointers. 2. HOW do you execute SIMPLE commands (no I/O redirect, no pipe) 3. HOW do you handle > for output redirection 4. For the command line ls -l -a > outfile what's argv[] passed to the ls program? WHY? 5. HOW do you handle pipe command, e.g. cmd1 | cmd2 =============================================================================== Total: 100 points