Question: = = = = nixtorial lesson: Cut + Paste _ 2 = = = = Continuing with ' b 5 people.txt ' ( again ,
nixtorial lesson: CutPaste
Continuing with bpeople.txtagain indentation is not part of the file:
Last First Rank
Sheridan John Captain
Ivanova Susan Commander
Mollari Londo Ambassador
Garibaldi Michael Chief Warrant Officer
Franklin Stephen Lieutenant
Sinclair Jeffery Commander
If we want the whole last name, instead of listing the columns
separately, we can use ranges.
Last names are in columns and first names in columns
Ranks are columns for the longest one here but we could
say if we wanted to be sure we didn't cut something off.
Running this:
cut b bpeople.html
Would give:
Last Rank
Sheridan Captain
Ivanova Commander
Mollari Ambassador
Garibaldi Chief Warrant Officer
Franklin Lieutenant
Sinclair Commander
Note that if we did b there wouldn't be a space between
Mr Garibaldi's name and his rank.
Use cut to get the last names and ranks from dspeople.txt with
one space between the longest last name and the start of that person's
rank. When you're sure your answer is right, send the output to
dsranks.txt and type 'ready'.
nixtorial cat bpeople.txt
Last First Rank
Sheridan John Captain
Ivanova Susan Commander
Mollari Londo Ambassador
Garibaldi Michael Chief Warrant Officer
Franklin Stephen Lieutenant
Sinclair Jeffery Commander
nixtorial cat dspeople.txt
Last First Rank
Sisko Benjamin Captain
Kira Nerys Major
Bashir Julian Lieutenant
Dax Jadzia Lieutenant
O'Brien Miles Chief Petty Officer
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
