This is for UNIX: Using Vi, create a document called \"Gettysburg\" that contain
ID: 3739304 • Letter: T
Question
This is for UNIX:
Using Vi, create a document called "Gettysburg" that contains the text of the Gettysburg
Address, formatting exactly how it appears here:
“Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived and so dedicated, can long endure. We are met on a great battle-field of that war. We have come to dedicate a portion of that field, as a final resting place for those who here gave their lives that that nation might live. It is altogether fitting and proper that we should do this.
But, in a larger sense, we can not dedicate—we can not consecrate—we can not hallow—this ground. The brave men, living and dead, who struggled here, have consecrated it, far above our poor power to add or detract. The world will little note, nor long remember what we say here, but it can never forget what they did here. It is for us the living, rather, to be dedicated here to the unfinished work which they who fought here have thus far so nobly advanced. It is rather for us to be here dedicated to the great task remaining before us—that from these honored dead we take increased devotion to that cause for which they gave the last full measure of devotion—that we here highly resolve that these dead shall not have died in vain—that this nation, under God, shall have a new birth of freedom—and that government of the people, by the people, for the people, shall not perish from the earth.”
Perform the following actions:
? Delete every vowel in the sentence that begins "We have come to dedicate a portion"
? Using global search and replace, convert each occurrence of "us" to "U.S."
? Delete the 10th line.
? Using yank and put, move the last line to the top of the document
? Insert the word count at the bottom of the document.
Using the requirements from “Gettysburg” create a sed script to accomplish the same task. Your artifacts should be placed in a directory called “project5” under your home directory and must include both the modified copy of Gettysburg and your bash script containing the sed commands you used.
Explanation / Answer
Using global search and replace, convert each occurrence of "us" to "U.S."
%s/us/U.S./g
Delete the 10th line.
10GD
Using yank and put, move the last line to the top of the document
Gyy1GP
The file looks like:
shall not perish from the earth.”
"Four score and seven years ago our fathers brought forth on this continent, a new nation,
conceived in Liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing whether that nation, or any nation so conceived
and so dedicated, can long endure. We are met on a great battle-field of that war. We have come
to dedicate a portion of that field, as a final resting place for those who here gave their lives that
that nation might live. It is altogether fitting and proper that we should do this.
But, in a larger sense, we can not dedicate—we can not consecrate—we can not hallow—this
poor power to add or detract. The world will little note, nor long remember what we say here, but
it can never forget what they did here. It is for U.S. the living, rather, to be dedicated here to the
unfinished work which they who fought here have thU.S. far so nobly advanced. It is rather for U.S. to
be here dedicated to the great task remaining before U.S.—that from these honored dead we take
increased devotion to that caU.S.e for which they gave the last full measure of devotion—that we
here highly resolve that these dead shall not have died in vain—that this nation, under God, shall
have a new birth of freedom—and that government of the people, by the people, for the people,
shall not perish from the earth.”
~
~
~
~
~
~
~
~
~
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.