05.08.2013 Views

Module 13: Shell Scripts in UNIX - E-Courses

Module 13: Shell Scripts in UNIX - E-Courses

Module 13: Shell Scripts in UNIX - E-Courses

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Operat<strong>in</strong>g Systems Prof. P. C. P. Bhat<br />

Operat<strong>in</strong>g Systems/<strong>Shell</strong> <strong>Scripts</strong> <strong>in</strong> <strong>UNIX</strong> Question Bank<br />

<strong>13</strong>.11 Simple Compiler <strong>in</strong>terface. The program should take the name of the C file to be<br />

P.C.P.Bhat/IISc Bangalore M<strong>13</strong>/V1/June 04/2<br />

Indian Institute of Science Bangalore<br />

compiled. It should also take the dependency files (math, pthread etc) and the name<br />

of the exe that should be created. It should then compile the program. If no exe is<br />

mentioned, then the default is a.out. If the source file does not exist, pr<strong>in</strong>t error<br />

message (do not use cc to pr<strong>in</strong>t the error message).Bonus: Give an option to<br />

compile all “C” programs <strong>in</strong> a directory provided there is no dependency. Ma<strong>in</strong>ta<strong>in</strong><br />

a log of all the commands run. (Use of decision mak<strong>in</strong>g, loop<strong>in</strong>g call<strong>in</strong>g cc, writ<strong>in</strong>g<br />

to file us<strong>in</strong>g shell).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!