Neptun-code: IPM-18AUTEPROGEG
In 2022 autumn semester, this course is in English.
Exam
Write a simplified grep utility. Deadline is 2nd Dec, Friday, 23:59. You should send me the solution in mail to gsd@inf.elte.hu as a single source file.
Do not forget to take the exam in NEPTUN when it will be possible!
Requirements:
Minimum requirement that the program works on the standard input or from file parameters taking a mandatory first parameter PATTERN and print those (and only those) lines to the standard output which contains the PATTERN. Check the starndard function strstr().
Next step is to implement the -i flag: grep -i PATTERN FILES… The -i flag tells grep to ignore case sensitivity in pattern matching.
Maximum level is to implement -v flag to invert the behavior: print the lines which has no match. This level also suppose the handle of -i flag.
Lecture (suggested)
time | place | lecturer | contact |
---|---|---|---|
Wednesday 14.00-16.00 | D 0-822 Mogyoródi | Tibor Brunner | bruntib@ik.elte.hu |
Practice
time | place | lecturer | contact |
---|---|---|---|
Monday 18.00-19.30 | D 00-807 Database lab | Porkoláb Zoltán | gsd@inf.elte.hu |
Planned lectures:
- Introduction, compilation, linking. link
- Structure of C programs. link
- Preprocessor. link
- Operators, expressions, evaluation of expressions. link
- Statements, control structures. link
- Scope and life. link
- Declarations, definitions. link
- Functions, parameter passing, parameters of main. link
- Structs and dinamic memory handling.
- Arrays, pointers, pointer-aritmetics. link
- Implementing a unix utility. link
Evaluation
TBA.
Readings
Brian W. Kernighan, Dennis Ritchie: The C Programming Language, 2nd Edition. Prentice Hall (April 1, 1988). ISBN-13: 978-0131103627. ISBN-10: 0131103628.
Draft C standard
N1570 Committee Draft — April 12, 2011 ISO/IEC 9899:201x