Question: 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
- 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?
- 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
Get step-by-step solutions from verified subject matter experts
