Exercise 1 Before you start to write the next script, first run the 'who' command at the UNIX prompt and redirect it into a file named users.txt (Then, look at the file and study its format!) Afterward, write a program that reads in and uses the &

education

Description

Exercise 1 Before you start to write the next script, first run the 'who' command at the UNIX prompt and redirect it into a file named users.txt (Then, look at the file and study its format!) Afterward, write a program that reads in and uses the 'split' function to break up each line of the 'users.txt'file into three variables: who, where, and when_and_IP, and then reprints it to the screen in this format: who on where at when_and_IP. So, if your text input file contains three lines, I expect to see code that produce three lines of output, each of which will look like: bsd17 on ttyp0 at Aug09 08:07 (132.85.201.182). Exercise 2 Write a program that takes a sentence with two adjectives describing an animal and reverses the adjectives, using regular expressions, and then outputs the new sentence. The sentence that it must read in should be of the following format, where the two adjectives are separated by a comma and a space: The quick, brown fox jumped over some other non-descript animal. rint out any words that contain two vowels next to each other. The vowels do not have to be the same. You should create a test input file and make your script process it.


Related Questions in education category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.