Third day was long day (Actually we had a meeting twice in the last week but the duration was small-So I am calling this as a single day).
Following stuff was covered:
- Arrays, Array operations like push, pop, shift, unshift.
- split function on strings - to covert them into arrays (did not get time to talk about join-later)
- Introduced -foreach- also shown the use of foreach(0..10), how it can be used on any list.
- Regular Expression(RE)- Just introduction. Explained meaning of RE. A few examples. Explained command "grep". The shown some similarites. Played with many strings, wrote small scripts. The five rules-how RE works will be covered on next day. I am planing to talk more from Regular Expression tutorial.
- Example - Count the number of lines from a text file.
- Example - Count the number of words (what do i mean by "word"?) from a text file.
- Example -various parsing stuff on /etc/passwd file using RE, using split command on each line.
- Example-How to build the a script which can give current status/details of Linux system-use /proc filesystems. e.g. /proc/cpuinfo shows details on cpu, so how RE can be helpful to get the exact information. Assginment will be given to create the script which will have output similar to phpsysinfo in text format. Thats in next lecture.
It was good day. Response was also good.
No comments:
Post a Comment