[LINUX] I need the command for each of these steps. Home directory = fire50 ----
ID: 3734655 • Letter: #
Question
[LINUX]
I need the command for each of these steps. Home directory = fire50
----------------------------------------------------------------------------------------------------------------
Step 3: You can use the cat utility to create a file in your current directory. For example, "Hello World!", the content of MyFile, is created as follows:
$cat>MyFile
Hello World!
CTRL-D
Now you need to use the cat utility to create Sam's chapter files in your home directory from the information provided here:
Step 4: Verify that all files were created in your home directory. For each chapter, verify the line, word, and character count. Note your results in the answer sheet.
Step 5: Create a file in your home directory named ChapterList that lists the names of the first three chapters in your home directory. Sort the file in reverse order and note the results in the answer sheet you used from Step 4.
Step 6: Locate the word thunderstorm in the appropriate chapter by employing the correct utility at your terminal screen. Locate the word storm. Do the results differ? Give reasons for your answer in the answer sheet you used from Step 4.
Step 7: To review how the chapters of Sam’s novel flow together, create a file named Novel that is a concatenation of the three chapter files. Display the contents of the Novel file on your screen to ensure that it successfully contains the text of all three chapters.
Chapter Title Text Chapter_1 It was a dark and stormy night. Christina unsuccessfully tried to block out the sounds of the thunderstorm. Chapter_2 Christina looked at her watch. He was late. Chapter_3 The sun was setting but Jake didn’t care.Explanation / Answer
Step 4:
[]$ wc -lwc Chapter_1 Chapter_2 Chapter_3
1 18 108 Chapter_1
1 8 44 Chapter_2
1 8 44 Chapter_3
3 34 196 total
Step 5:
[]$ mkdir ChapterList
[]$ mv Chapter_1 Chapter_2 Chapter_3 ChapterList
[]$ cd Chapter/
[ Chapter]$ ls -lrt
total 12
-rw-r--r-- 1 cissys cissys 108 Mar 21 22:51 Chapter_1
-rw-r--r-- 1 cissys cissys 44 Mar 21 22:53 Chapter_2
-rw-r--r-- 1 cissys cissys 44 Mar 21 22:54 Chapter_3
[ ChapterList]$ sort -r Chapter_1 Chapter_2 Chapter_3
The sun was setting but Jake didn’t care.
It was a dark and stormy night. Christina unsuccessfully tried to block out the sounds of the thunderstorm.
Christina looked at her watch. He was late.
Step 6:
[ ChapterList]$ grep thunderstorm Chapter*
Chapter_1:It was a dark and stormy night. Christina unsuccessfully tried to block out the sounds of the thunderstorm.
[ ChapterList]$ grep storm Chapter*
Chapter_1:It was a dark and stormy night. Christina unsuccessfully tried to block out the sounds of the thunderstorm.
Step 7:
[ ChapterList]$ cat Chapter_1 Chapter_2 Chapter_3 > Novel
[ ChapterList]$ cat Novel
It was a dark and stormy night. Christina unsuccessfully tried to block out the sounds of the thunderstorm.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.