OPS435 Notes

General Announcements (Instructor: Murray Saul)

• Sept 6, 2011 •

Please view the weekly notes displayed below. It is recommended
to view the notes prior to class to get a basic idea of the
content. The instructor will be providing in class instruction
and providing examples to assist in the learning process…!

General

Things You Should Know First

• Sept 6, 2011 •

Useful Websites:  Common OPS435 Webpage: http://cs.senecac.on.ca/~fac/ops435/2008_dev
Instructor’s Webpage: http://cs.senecac.on.ca/~murray.saul
Learn Webmail: https://learn.senecac.on.ca
Blackboard: https://my.senecacollege.ca
Moodle Learning Management System (LMS)

Instructor’s Course Policies:  https://murraysaul.wordpress.com/instructors-policies/

Email Address:
murray.saul@senecac.on.ca

Office:
T2105 (TEL Building)

Week 1: Introduction to Shell Scripting

•Sept 6 – 11, 2011 •

OPS435 Subject Outline:  html
Instructor’s Course Policies: html

UNIX/Linux Overview | Slides: [odp] [pdf] [ppt]
Shell Scripting – Overview | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Optional – Not Required)  Online tutorial: [html ]

Lab 1: “First Shell Script”  Lab Instructions: [html]

Other Resources:
Listing of Linux Commands(Covered in Course): [html]

Week 2: Basic Shell Concepts

• Sept 12 – 18, 2011 •

Basic Shell Concepts | Slides: [odp] [pdf] [ppt]
File Name Expansion / Redirection | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 2: “Basic Shell Concepts” Lab Instructions: [html]

Other Resources:

Week 3: Variables

• Sept 19 – 25, 2011 •

Variables | Slides: [odp] [pdf] [ppt]
Inclass Practice | Reality Check: [odt] [pdf] [doc] Solutions: [txt ]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 3: “Variables” Lab Instructions: [html]

Other Resources:

Sample Shell Scripts [ html ]

Week 4: Additional Shell Scripting Tools

• Sept 26 – Oct 2, 2011 •

Additional Shell Scripting Tools | Slides: [odp] [pdf] [ppt]
Inclass Practice | Reality Check: [odt] [pdf] [doc] Solutions: [[doc] Solutions: [txt ]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 4: “Additional Scripting Tools” Lab Instructions: [html]

Assignment #1 Specifications [ html ]

Other Resources:

Sample Shell Scripts [ html ]

Week 5: Logic / Flowcharting

• Oct 3 – 9, 2011 •

Logic / Flowcharting | Slides: [odp] [pdf] [ppt]
Logic Control-Flow Statements | Slides: [odp] [pdf] [ppt]
Inclass Practice | Reality Check: [odt] [pdf] [doc] [html] Solutions: [ txt ]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 5: “Logic” Lab Instructions: [html]

Other Resources:

Sample Shell Scripts [ html ]

Week 6: Logic / Flowcharting

• Oct 10 – 16, 2011 •

Logic (Continued) / Loops | Slides: [odp] [pdf] [ppt]
Sample Walk-thru Demo | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 6: “Logic / Loops” Lab Instructions: [html]

Other Resources:

Sample Shell Scripts [ html ]

Quiz #3 (You can run script to check your results for walk-thru) [ html ]

Week 7: Using Functions

• Oct 17 – 23, 2011 •

Using Functions | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 7: “Loops (Determinant, Indeterminant)” Lab Instructions: [html]
(Due in two weeks from this Friday)

Reality Check Question: [ doc ]

Other Resources:

Sample Shell Scripts [ html ]
[report.bash]

Week 8: Regular Expressions / Trapping Signals

• Oct 31 – Nov 6, 2011 •

Testing Compound Conditions
Regular Expressions | Slides: [odp] [pdf] [ppt]
Trapping Signals | Slides: [odp] [pdf] [ppt]
Inclass Practice | Reality Check: [odt] [pdf] [doc] [html]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 8: “Regular Expressions / Trapping Signals” Lab Instructions: [html]

Other Resources:

Sample Shell Scripts [ html ]

Week 9: Basic awk utility

• Nov 7 – 13, 2011 •

Basic awk | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Other Resources:

Sample Shell Scripts [ html ]

Week 10: Advanced awk utility

• Nov 14 – 20, 2011 •

Additional awk | Slides: [odp] [pdf] [ppt]
Advanced awk | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials (Required)  Online tutorial: [html ]

Lab 9: “awk Utility” Lab Instructions: [html]

Assignment #2 Specifications [ html ]

Other Resources:

printf demos [ html]
Sample Shell Scripts [ html ]

Week 11: sed utility

• Nov 21 – 27, 2011 •

Basic sed Utility | Slides: [odp] [pdf] [ppt]
Advanced sed Utility | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials  Online tutorial: [html ]

Lab 10: “awk Utiltity” Lab Instructions: [html]

Other Resources:

Sample Shell Scripts [ html ]

Quiz #3 Solution [ html ]

Additional Awk Demo [ txt ]

Week 12: sed utility / Cron

• Nov 28 – Dec 4, 2011 •

cron Utility | Slides: [odp] [pdf] [ppt]
Cron Quick Reference | Handout: [odt] [pdf] [doc]

RCS (Revision Control System) | Slides: [odp] [pdf] [ppt]
Online Linux Tutorials  Online tutorial: [html ]

Lab 11: “sed Utiltity” Lab Instructions: [html] (bonus)

Other Resources (For Interest Only):

RUN LEVEL SCRIPTS (Start and Kill)

Week 13: Course Review

• Dec 5 – 9, 2011 •

Course Review / Complete Outstanding Materials


64 Responses to “OPS435 Notes”

  1. why doest lab 8 work?

  2. Please give an example of why it doesn’t work… i.e. explain what part of it you are having problems…

  3. There was a typo in lab #8 indicating pressing <ctrl><c>
    It has now been fixed… Perhaps that was the problem you were referring to in lab #8…

  4. i lol’d at “why doesnt lab 8 work…

    i lol’d again at the fact that doesnt was not spelled correctly.

    • LOL. And you didn’t spell doesn’t correctly either. There is an apostrophe sign between n and t. Sorry but you are wrong too. 🙂

  5. i accidentally removed my assignment 2! doing rm -r, is there a way I can undo this or recycle bin or something

    • If you did via an SSH session (i.e. from the shell prompt – no).
      You would have to request ASC to restore your file from backup.
      You would have to e-mail help@acs.senecac.on.ca

      This usually take 2-3 days…

      Murray

  6. I rm *’d my assignment 3 by mistake as well.

    I figured doing it all over again will make me super smart now though.

  7. I rmed my assignment as well. Not by accident, but because the bloody thing does not work. My friend told me to error check a number I was supposed to check if the variable divided by itself would equate to zero, but the implementation is rather difficult. I am going to start from scratch and do everything with awk this time.

    • Oops, I meant variable/variable eq 1 and not zero.

    • I think your friend led you astray.
      That is way too complex. I have demonstrated how to do this in class many times. It goes back to the lesson in testing – there are two ways to test!
      This is easy, not difficult!!!! That’s about all I will say about that!!!

      Murray

  8. I can’t submit lab 11 I get this message:

    You must create directory pathname “~/l1b11” first,
    change to that directory and complete this lab…

    so I made that directory and got the same message.

  9. I only managed to find 9 errors on the exam. Fail 😦

    • I assume that you are talking about the last question – I hope you don’t mean you found 9 typos of the final exam!

      There was one at the very beginning that was very subtle – there are 10 distinct errors. I’m looking at the 10 bugs as I’m typing this 🙂
      Good luck on the other exams 🙂

      Murray

  10. Mr Saul , for assignmet2 winter 2010. In the sample run while recording the payments,you have provided the script “the transaction no” i was wondering if it is “Invoice number” rather because it doesnt make any difference.The payment goes towards vendor anyways which has a unique Invoice number.Any comments please!!

  11. Here is the error message I got for lab11:
    You must create directory pathname “~/l1b11” first,
    change to that directory and complete this lab…

    Check the location and spelling of your directory,
    and run submission program again…
    kliu39@matrix:~/l1b11>

    The working directory should be l1b11 or Lab11? Confused. My current directory is Lab11, then I renamed it with l1b11, but both failed with same error message

    • Professor, I already figured that out. I examined your lab check bash file and found that the working directory should be “lab11”. However, according to your lab instruction, the working directory is “Lab11”, and from the error message, the working directory is “l1b11”. Maybe we need update the lab instruction and the error message for failed submit. Thanks a lot.

  12. Hey Murray,
    So I was in your class last semester (Now working at co-op). I have to do a lot of scripting here and your ppt’s have been awesome! I’m taking a look at the awk examples right now 🙂

    Cheers,

    • Good to hear you are learning what I taught you.

      I had some of my students see your posting to confirm that OPS435 course is indeed important! 🙂

      Murray

  13. Hey Murray
    I have a question about the OPS435 assignment2.. will you be executing the bash file (makePayments.bash) within the asn2 directory ? or will it be done through another directory ?
    Cause I have created the bash file where it creates/deletes the temporary files within my asn2 directory
    Thanks

  14. Hey Murray
    I have a question about the OPS435 assignment2.. will you be executing the bash file (makePayments.bash) within the asn2 directory ? or will it be done through another directory ?
    Cause I have created the bash file where it creates/deletes the temporary files within my asn2 directory
    Thanks

  15. Hi Murray
    I’m currently working on my OPS435 assignment 1, however I cannot recall the command for displaying the current users first / last name etc. As well, for our bash script would you prefer the code to be separated with comments to explain the processes, or just have comments at the beginning of the bash script.

    Also, to change the error message to a value other than 0, I simply put || exit >2 Or is there more information that must be added, in order to write to said error.

    Thanks

    • I have mentioned that method to get the first and last name in class many, many times. it is in the lab (lab #2 as I recall) and it was on quiz #1 question ! I recommend to read the notes and labs…. Commenting to explain shell script is go where ever in the script…

      Murray Saul

  16. I am unable to find an answer for online tutorial review question. Is there was way I can skip a question?

    • Actually, they are shell scripts, so you can open another shell, open the shell script in an editor, go to the bottom, move upwards are get the answers.
      At least this gets students to learn to read a shell script, and then they don’t get stuck. I already mentioned that in class…

  17. hi murray, how’s it goin? i just wanna ask something about a good programming language to start with. On my very own i am just new to programming and it is kind of hard for me especially i dont have any experience when it comes to computer languages.Thank you and have a nice day.

    • Bash shell scripting is a good place to start, then if you are curious, I would try C programming (which has syntax similar to JavaScript and Perl), then if you are keen, perhaps C++, and Python. Point here is to be flexible and adaptable to quickly learning languages, but general programming approaches are solid… although subtle differences in syntax, etc…

      Murray Saul

  18. I have a question that has nothing to do with this course. I am thinking to broadcast internet radio live. Do you know any free source that i can use or can you give me any tips.

    thanks
    Marooban

  19. I don’t even know how I ended up here, but I believed this publish was good. I do not recognise who you are but definitely you’re going to a well-known blogger when you are not already 😉 Cheers!

  20. Hey there, You have performed an incredible job. I’ll definitely digg it and in my view suggest to my friends. I’m confident they will be benefited from this site.

  21. Terrific paintings! That is the kind of info that are supposed to be shared around the internet. Shame on search engines for no longer positioning this submit upper! Come on over and visit my web site . Thanks =)

  22. I don’t want to appear too off topic, but I just would like to share that is a excellent posting. I’ve been really trying very hard in the previous 2 or 3 long years to settle every one of my financial debts so I would be able to leave my job and as a result run a blog fulltime.

  23. Very interesting post.

  24. – HowDy
    I value your website alot.

    Will bookmark asap.

    Gracias for publishing. ^_*

  25. nice things you have posted here.. this indicates you may have put great effort written this

  26. I found your site – https://murraysaul.wordpress.com/ops435/ – on StumbleUpon today and thought I’d check it out. I bookmarked it and will come back to check on some more posts later.

  27. Appreciate it for sharing OPS435 Notes Murray Saul’s CyberSpace with us keep update bro love your article about OPS435 Notes Murray Saul’s CyberSpace .

  28. Thanks for sharing OPS435 Notes Murray Saul’s CyberSpace with us keep update bro love your article about OPS435 Notes Murray Saul’s CyberSpace .

  29. I found your blog on google. I think it’s awesome.

  30. I’m impressed at how you have a great understanding of the matter. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your webpage? My Facebook blog site is in the very same niche as yours and my readers would definitely benefit from some of the information you present on your site. Please let me know if this is a problem with you. Regards!

  31. Nice site, looks very organized. Been surfing for just a site such as this.

  32. Hi there, I want to ask you something. Is this site a wordpress web log? My group is planning on shifting my web site from Blogger to wordpress, you think this can be probable? Additionally did you design this particular template yourself some how? Bless you for your assistance!

  33. Appreciate it for sharing OPS435 Notes Murray Saul’s CyberSpace with us keep update bro love your article about OPS435 Notes Murray Saul’s CyberSpace .

  34. Thanks for sharing OPS435 Notes Murray Saul’s CyberSpace with us keep update bro love your article about OPS435 Notes Murray Saul’s CyberSpace .

  35. It’s a shame you don’t have a give money button! I’d definitely give money for this outstanding webpage! I suppose for the moment i’ll be satisfied bookmarking and incorporating your Feed to my Google account. I look forward to fresh messages and will share this blog with my Facebook team:

  36. I shall be subscribing to your feed we we imagine you post again soon. Thanks , hlyn Steger

  37. To begin with Off, let me commend your clearness on this matter. I’m not an authority on this subject, but soon after studying your write-up, my recognizing has formulated significantly. Remember to make it possible for me to grab your rss feed to remain in contact with any forthcoming updates. Optimistic job and will present it on to acquaintances and my viewers.I’d love to thanks to the efforts you’ve designed in composing this informative article. I am likely for your identical greatest get the job done from you later on in addition. The truth is your fanciful creating talents has prompted me to begin my very own blogging site now. Essentially the running a blog is spreading its wings swiftly. Your compose up is usually a wonderful case in point of it.

  38. Good post. I be taught one thing much harder on different blogs everyday. It would continually be stimulating to see content from different writers and apply some something from their store. I’d require to use some while using the content on my own blog whether that you do not mind. Natually I’ll give you a link as part of your web blog. Thank you sharing.

  39. There is so many labs, tutorials and assignment, we (students) have life TOO!!!

  40. Hello! Someone in my Facebook group shared this website with us so I came to give it a look. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers! Fantastic blog and terrific style and design.

  41. you are awesome!

  42. Not often do I encounter a weblog that’s both educated and entertaining, and let me tell you, you might have hit the nail on the head. Your concept is outstanding; the problem is something that not enough individuals are speaking intelligently about. I’m very satisfied that I stumbled across this in my quest for info relating to this.

  43. It’s my first time that I visit here. I found a lot of nice article. THX!stuff in your article. Keep it up. Thank you.

  44. Howdy very nice website!! Man .. Excellent .. Amazing .. I will bookmark your website and take the feeds additionally?I am happy to search out a lot of helpful information here within the submit, we want develop extra techniques in this regard, thank you for sharing. . . . . .

  45. Thank you for sharing excellent informations. Your website is very cool. I’m impressed by the details that you’ve on this website. It reveals how nicely you perceive this subject. Bookmarked this web page, will come back for more articles. You, my friend, ROCK! I found simply the info I already searched all over the place and simply could not come across. What a perfect web site.

  46. Oh man, this was sick! Definitely sharing this sucker with friends :). Thank you!

Leave a reply to Dpugie Cancel reply