Automatically UNIX script

Write a unix script to do the following automatically-

  1. Identify the latest path version directory under: /data/cs/chk. The latest at this time is 15_1_3.
    /data/cs/chk

    drwxr-x--- 2 dba tms 4096 Jan 22 11:18 15_1_2
    drwxr-x--- 2 dba tms 4096 Jan 22 11:18 15_1_3

  2. Check for any new versions under /data/cs/test

drwxrwxr-x 2 krp set 4096 Dec 13 13:14 15_1_3
drwxrwxr-x 2 krp set 4096 Jan 26 12:19 15_1_4

  1. If there is a new versions (in this case version 15_1_4 is new), make new directory under /data/cs/chk /15_1_4
    � Copy dataset link.* from /data/cs/test /15_1_4 to /data/cs/chk/15_1_4
    � Copy dataset poin.* from path directory: /data/cs/chk /15_1_3 to : /data/cs/chk /15_1_4 Copy com.sas from prior version directory to new version directory. From /data/cs/chk /15_1_3 to /data/cs/chk /15_1_4
    � Run the SAS program /data/cs/chk /15_1_4 /rt.sas

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.