For this assignment, you will use awk only. Do not use bash, sed, perl, Python, or any other languages/utilities not explicitly specified.
News Commands Awk Script
You have set up a news server and your feed has just sent you his active file. Rather than typing and
executing the commands on an individual basis, you decide to write an awk script to create from the
active file a file consisting of the necessary addgroup commands. You then plan to execute the file
containing the addgroup’s.
1. The active file is located in the course directory on the fox machines. In order to save yourself some typing, create a symbolic link in your assign3 directory by using
2. Each line in the active file should be converted to an addgroup command. For example, the previous three lines should generate the following commands: addgroup comp.os.linux.announce m addgroup comp.arch y addgroup utsa.cs.2413 y
3. The awk script must be in a file named news.awk in your assign3 folder, and you should be able
to run the conversion with the following command:
awk -f news.awk active > news.commands
Get Free Quote!
413 Experts Online