Question: = = = = nixtorial lesson: Cut + Paste _ 2 = = = = Continuing with ' b 5 people.txt ' ( again ,

==== nixtorial lesson: Cut+Paste_2====
Continuing with 'b5people.txt'(again, 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 1-9, and first names in columns 12-18.
Ranks are columns 21-41(for the longest one here), but we could
say '21-50' if we wanted to be sure we didn't cut something off.
Running this:
cut -b1-10,21-50 b5people.html
Would give:
Last Rank
Sheridan Captain
Ivanova Commander
Mollari Ambassador
Garibaldi Chief Warrant Officer
Franklin Lieutenant
Sinclair Commander
(Note that if we did '-b1-9,21-50', there wouldn't be a space between
Mr Garibaldi's name and his rank.)
Use cut to get the last names and ranks from 'ds9people.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
'ds9ranks.txt' and type 'ready'.
nixtorial> cat b5people.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 ds9people.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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!