Start talking the Unix command language (OER)
Step 1.
Take a copy of ~a01/programming.tar.gz to your home directory and unpack it. Hint 'tar -xzvf programming.tar.gz'. You will find two files, cent2fahr.c and makefile, in it. The first one is a program written in C. The second one contains compilation commands.
Read the C file and see whether you understand it. Then run the 'make' command in the same directory.
$ ls
cent2fahr.c makefile
$ make
gcc -o cent2fahr cent2fahr.c
$ ls
cent2fahr cent2fahr.c makefile
It has created a new file called cent2fahr. Run it:
$ ./cent2fahr
Enter temperature in Celsius: 55
55.00 Celsius = 131.00 Fahrenheit
Step 2
Now in the same directory make a copy of cent2fahr.c to fahr2cent.c. Edit its content to make it do what the new name suggests!
Extend the makefile with the two similar lines - those that make a new executable fahr2cent.
Note the tabulator in:
cent2fahr: <Tab>gcc -o cen2fahr cent2fahr.c
Step 3
Clean the directory from everything else leaving only the two C files and the makefile.
Now make an entry in the assignment tool saying that you're done. Don't forget to mention your Shell username.
Optionally
Make a new tar.gz file of the programming/ directory. (Hint. 'tar -czvf programming.tar.gz programming/') and upload the file on to the assignment.
Optional hint:
To download a file from the lab server to your local computer just type the following command in a terminal - in Linux or Windows. Notice the dot at the end!
$ scp USERNAME@lab.edunet.lk:programming.tar.gz .
To upload a file to the lab server, in to your home directory:
$ scp programming.tar.gz USERNAME@lab.edunet.lk:
If you really want a graphical program, then get a FTP program like FileZilla - available for both Windows and Linux. The settings are similar to PuTTY.