Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need it for Shell scripting: UNIX I have a text file astronauts.txt. I need to extract the second word of each line from this text

Need it for Shell scripting: UNIX

  1. I have a text file astronauts.txt. I need to extract the second word of each line from this text file, astronauts.txt. and save it in a new file called members.txt. How can I do this using a (i) for loop and (ii) command cut?
  2. I have created a directory that has 5 files.

Name of the Directory: Space

Name of File 1 : Astronautone

Name of File 2: Astronauttwo

Name of File 3: Astronautthree

Name of File 4: Astronautfour

Name of File 5: Astronautfive

I want to create a new file named Astronautsummary which will be having the 10th line of each file saved in the directory Space using for loop.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

=+ how might this lead to faster growth in productivity?

Answered: 1 week ago