Automatically UNIX script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automatically UNIX script
# 1  
Old 04-26-2013
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

3. 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

Last edited by roy1912; 04-26-2013 at 01:31 PM.. Reason: unix script writing
# 2  
Old 04-26-2013
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automatically invocation of unix command

Dear All, I have a directory when i received files by means of FTP, i want to invoke my shell scripts as soon as file hit the directory, if the files hit 10 times then the shell scripts should also get executed 10 times. thanks rajesh (1 Reply)
Discussion started by: guddu_12
1 Replies

2. UNIX for Advanced & Expert Users

How to i execute .rdf file oracle report automatically in cron tab unix

Hi, I want to execute .rdf file which uses oracle report in crontab ..Can you please help me out how to schedule it crontab.as it is a rdf file Please give any suggestions regarding the above issue. (0 Replies)
Discussion started by: soumyamishra
0 Replies

3. HP-UX

Unix server restart automatically

We have HP K class unix server, It's automatically restart the server. (10 Replies)
Discussion started by: ganesh24pal
10 Replies

4. Shell Programming and Scripting

how to send mail automatically in unix

Dear friends, I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this. I want to get alert mail automatically when ever data is greater than or equal to 600. to my yahoo mail. i want to put that mail script in crontab so it will check the data daily at... (7 Replies)
Discussion started by: rajan_ka1
7 Replies

5. Shell Programming and Scripting

How can my unix shell script automatically connect to remote host?

How can my unix shell script automatically connect to remote host? Assume that there is a remote host called "rhost". When I connect to that host i give the command "telnet rhost". It then asks me for my id and password. Once i give it connects there. I want to automate these steps. I want... (8 Replies)
Discussion started by: digdarshan
8 Replies

6. AIX

Vi opens automatically when i login to a unix box

When I login to a unix box using a putty session , I'm landed in a vi editor, instead of my home directory,I'm guessing instead of pointing me to my home directory, the system points me to /usr/bin/vi. As a result, everytime I log into the system I open up a vi editor and am in there. how do i... (3 Replies)
Discussion started by: ramky79
3 Replies

7. UNIX for Dummies Questions & Answers

how to run a Script automatically

How to make a script run automatically using a cron?? i do not know abt cron...... if i have simple.sh file and i need this to run everyday at a particular time what needs to be done thanks in advance (4 Replies)
Discussion started by: hamsa
4 Replies

8. Shell Programming and Scripting

ftp file from Windows to Unix automatically

Hi, Is there a way to ftp file from windows to Unix directory by using crontab to set up a job ? Thanks! (4 Replies)
Discussion started by: whatisthis
4 Replies

9. UNIX for Dummies Questions & Answers

there was a strange character(^M) been added automatically in UNIX

I used Notepad to compile my txt file and then I transferred this file to UNIX. When I use vi to open the file, I found that at the end of each line there was a "^M" character. In the original txt file there was not this character. Why this character would been added automatically in UNIX? (4 Replies)
Discussion started by: Jasmine
4 Replies

10. UNIX for Dummies Questions & Answers

How to run a script automatically ?????

Hi All, How to run a script automatically using cronjob everyday from Monday to Friday 9A.M to 5P.M at an interval of ONE HOUR.I want the complete syntax means how to put in the cron job and there after. URGENTLY NEED HELP THANKS IN ADVANCE CHEERS Arunava (7 Replies)
Discussion started by: arunava_maity
7 Replies
Login or Register to Ask a Question