Open main menu

CDOT Wiki β

Changes

Tutorial5: Redirection

6 bytes removed, 08:10, 2 February 2021
INVESTIGATION 2: REDIRECTION USING PIPELINE COMMANDS
# Issue the following Linux '''pipeline command''': <span style="color:blue;font-weight:bold;font-family:courier;">ls /bin/???? | sort -r | grep r | cut -c1-3</span><br><br>
# Confirm that you are still located in the '''~/redirect''' directory.<br><br>
# Issue the following Linux '''pipeline command''':<br><span style="color:blue;font-weight:bold;font-family:courier;">ls /bin/???? | tee unsortedunsort.txt | sort -r | tee sortedsort.txt | grep r | tee matchedmatch.txt | grep r | head -20</span><br><br>What did you notice?<br><br>
# Check the files that were created to see how the '''tee''' command was used in the previous pipeline command.<br><br>
# Issue the '''rm''' command to <u>only</u> remove the temporary files called: '''unsorted.txt''' , '''sorted.txt''' , and '''unmatched.txt'''<br><br>
13,420
edits