1 / 14

System Programming Assignment 1 Shell and File Operation

System Programming Assignment 1 Shell and File Operation. Lecturer : Pao-Ann Hsiung Teaching Assistants: Shang-Wei Lin and Jying-Lwen Chiu Embedded Systems Laboratory National Chung Cheng University Chiayi, Taiwan-62102. Outline. Objective Assignments & Requirements Grading Policies

cleta
Download Presentation

System Programming Assignment 1 Shell and File Operation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. System ProgrammingAssignment 1Shell and File Operation Lecturer:Pao-Ann Hsiung Teaching Assistants: Shang-Wei Lin and Jying-Lwen Chiu Embedded Systems Laboratory National Chung Cheng University Chiayi, Taiwan-62102

  2. Outline • Objective • Assignments & Requirements • Grading Policies • Turn In

  3. Objective

  4. Objective • To be familiar with file operations in UNIX-like environments • To understand how a shell is implemented • To understand how APIs are implemented • To organize your program structure well

  5. Assignments & Requirements

  6. Assignments • You are asked to implement a simple shell and two APIs to help process files • find • To find a keyword in a specified file or directory • 在特定的檔案或資料夾中所有的檔案尋找關鍵字 • replace • To replace a word by another word in a specified file or directory • 在特定的檔案或資料夾中所有的檔案,用一個關鍵字取代另一個關鍵字

  7. Assignments (cont’d) • find [-cr] keywordtarget • c : upper/lower case sensitive • r : used when the target is a directory • keyword : the word you want to find • target :the target file or directory

  8. Assignments (cont’d) • replace [-cr] word1word2target • c : upper/lower case sensitive • r : used when the target is a directory • word1 : the word you want to replace by • word2 : the word you want to replace • target : the target file or directory

  9. Requirements • The final program after compilation will be named “shell” • After executing this shell, it will print “##” to prompt users and wait for input commands (find or replace)

  10. Requirements (cont’d) • The results of the find command will be shown in the stdout as follows: • In xxx Line xxx : Char xx ~ xx • You are responsible for writing a makefile suitable for your whole program • The document of your program will be named ‘readme.doc’

  11. Grading Policies

  12. Grading Policies • You have to give me: • A documentation (5 pages) about 15% • How you do it • Your thoughts after this assignment • The program files • Source code 60% • Makefile 10% • Error Controls & Extra Functions 15%

  13. Turn In

  14. Turn In • FTP • 140.123.102.96 : 21305 • SP2007/SP2007 • Put學號_姓名.zip into “Assignment_1” directory • Documentations • Program files • Makefile • Due date • 2007/03/27 23:59:59

More Related