Starting from:
$35

$29

Homework #1 Solution

Write a C (No C++) program that uses the system call "system" to execute UNIX commands. Your program must execute (without user input) the following commands all via the UNIX "system" call(s):




mkdir JUNK

cd JUNK

cp /etc/* .

ls r* listR

ls a* listA

ls m* listM

rm r*

rm a*

rm m*

ls * listX

cat listR list

cat listA list

cat listM list

cat listX list

sort list sorted

cp sorted ..

cd ..




rm ‐rf JUNK




 
See the unix "man" pages on system ‐ i.e. "man system" ‐ for info on the system command.







REQUIREMENTS:

‐‐‐‐‐‐‐‐‐‐‐‐‐

 
Your program must run in Streibel 109.




 
Your full name must appear as a comment at the beginning of your program.




 
Your source code must be named hw1‐yourname.c




3. Email your source (subject hw1‐yourname) to rmarsh@cs.und.edu.

























1/1

More products