CIS 2279 Homework Assignment #12

Due Mon Nov 28, 2016

Create a perl script named lab12.pl. The script needs to have the following features:(10 points each)

  1. From the output of the /sbin/ifconfig command, extract and display the computer's IP address (IPv4)
  2. Using the command last print any logins with your username.
    [Extra credit if you can limit it to print only the logins from the previous day. (This should work for any day the command is run.)]
  3. Run the command firefox with the option "-new-tab" for the URL "http://apollo.lsc.vsc.edu" as an argument to the command.
  4. Check the return code from the previous command and print to the screen whether the command completed successfully or not.
solution

last updated: 17 Nov 2016 21:07