Question: bash read remote file to variable and split using function Read remote file to variable and split using function For this assignment, your bash script

bash read remote file to variable and split using function bash read remote file to variable and split using function Read remote

Read remote file to variable and split using function For this assignment, your bash script will need to do a few things. 1. connect using curl to download the personfile.txt from ftp://10.60.168.126/pub the user will be anonymous. (sudo apt-get install curl) curl ftp://10.60.168.126/pub/personfile.txt 2. Your script will then need to store the data returned from curl into a variable (x=curl) ...... 3. Once the data is in the variable you can then use a for loop (see documents above) to read the variable line by line 4. Create and use the function to display the line in seperate parts. (meaning show the line with no pipe and a space between them.) 5. Store the age in a variable and calculate the average age again. Hint: The method for working on this project is one step at a time. Get curl working and storing in a variable. Then focus on reading from the variable line by line. Once those steps are complete begin looking at the cut example and command. Turn that cut into a function that can be called inside your loop

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 Databases Questions!