Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: Some linux help

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Unhappy Some linux help

    Using of Korn shall.

    Copy the completed adduser script from the chp6/lab/solutions directory, and then modify the script to do the following.
    a. Take exactly one command-line argument, which is assumed to be the new userís name. Output a USAGE message and, exit the script immediately when the script is executed with more or less than one command-line argument.
    b. Either assign the value of $1 to the name variable or change the grep command to search for $1.
    c. If the user name already exists in the mypasswd file, print a message, print the actual mypasswd entry for the user, and then exit the script.
    d. In the previous lab, you used sed to create a file of UID numbers. Numerically sort the contents of this file, and store the output into currentuid4 file.
    e. The last line in currentuid4 has the maximum UID number currently in use. Increment that number by 1 for the new user.
    f. Print the new user name and UID.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Hi and welcome.

    Sorry, but homework questions will not be answered here due to the forum policy.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts