CS246 Chapter Notes - Chapter 1-2: Shell Script, Passphrase, Regular Expression
Document Summary
Questions 1 and 2 are due on due date 1; the remainder of the assignment is due on due date 2: provide a unix command line to accomplish each of the following tasks. Your answer in each subquestion should consist of a single pipeline of commands, with no separating semicolons. Before beginning this question, familiarize yourself with the unix commands outlined on the unix handout. Keep in mind that some commands have options not listed on the sheet, so you may need to examine some man pages. Do not attempt to solve these tasks with find. (a) print the (non-hidden) contents of the current directory in reverse chronological order using time modi ed (most recently modi ed last). Place your command pipeline in the le a1q1a. txt. (b) print up to the last 5 lines that contain the string cs246 from the text le myfile. txt.