Changes

Jump to: navigation, search

Tutorial5: Redirection

10 bytes added, 10:24, 17 January 2021
INVESTIGATION 1: BASICS OF REDIRECTION
# Issue the following Linux command: <span style="color:blue;font-weight:bold;font-family:courier;">cat listing.txt cars murray > myoutput.txt 2> result.txt</span><br><br>What is displayed on the monitor? what do those files contain?<br><br>The '''Here Document''' allows you to redirect stdin from with the Linux command itself. Let's get some practice using the Here Document.<br><br>
# Issue the following Linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">cat <<+<br>line 1<br>line 2<br>line 3<br>+</span><br><br>What do you notice?<br><br>
# Issue the following Linux command:<br><span style="color:blue;font-weight:bold;font-family:courier;">grep 2 <<+<br>line 1<br>line 2<br>line 3<br>+</span><br><br>What do you notice? How does this differ from the previous command? Why?<br><br># Issue the '''ls''' command to view see all of the number of '''temporary files ''' that were created as a result of redirection.<br><br>
13,420
edits

Navigation menu