Changes

Jump to: navigation, search

Tutorial5: Redirection

299 bytes added, 20:35, 4 September 2023
no edit summary
{{Admon/caution|DO NOT USE THIS VERSION OF THE LAB. This page will no longer be updated.|'''New version here:''' https://seneca-ictoer.github.io/ULI101/A-Tutorials/tutorial5<br />'''Andrew's students please go here:''' http://wiki.littlesvr.ca/wiki/OPS145_Lab_5}}
=REDIRECTION: STANDARD INPUT / STANDARD OUTPUT / STANDARD ERROR=
<br>
|- valign="top" style="padding-left:15px;"
|colspan="2" |'''Slides:'''<ul><li>Week 5 Lecture 1 Notes:<br> [https://githubwiki.comcdot.senecacollege.ca/ULI101uli101/slides/raw/main/ULI101-5.1.pdf PDF] | [https://githubwiki.comcdot.senecacollege.ca/ULI101uli101/slides/raw/main/ULI101-5.1.pptx PPTX]</li><li>Week 5 Lecture 2 Notes:<br> [https://githubwiki.comcdot.senecacollege.ca/ULI101uli101/slides/raw/main/ULI101-5.2.pdf PDF] | [https://githubwiki.cdot.comsenecacollege.ca/ULI101uli101/slides/raw/main/ULI101-5.2.pptx PPTX] <br></li></ul>
simulate a quiz:
https://githubwiki.com/ULI101/labscdot.senecacollege.ca/rawuli101/mainfiles/uli101_week5_practice.docx
Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, etc).
'''Review Questions:'''
# Write a single Linux command to provide a detailed listing of all files in the '''/binetc''' directory, sending the output to a file called listing.txt in the “'''projects'''” directory (append output to existing file and use a relative pathname)
# Write a single Linux command to redirect the stderr from the command:<br>'''cat a.txt b.txt c.txt''' to a file called '''error.txt''' contained in the “'''assignments'''” directory. (overwrite previous file’s contents and use only relative pathnames)
# Write a single Linux command: '''cat ~/a.txt ~/b.txt ~/c.txt''' and redirect stdout to a file called “good.txt” to the “tests” directory and stderr to a file called “'''bad.txt'''” to the “'''tests'''” directory. (overwrite previous contents for both files and use only relative-to-home pathnames).

Navigation menu