Help needed - ksh shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help needed - ksh shell scripting
# 1  
Old 02-15-2008
Help needed - ksh shell scripting

Hi all,

i m new to Unix shell scripting(ksh)

i have a requirement, can anyone help me out in this..

spec:
i need to move all the files landing in "X" directory to "Y" directory automatically everyday at a particular time..
# 2  
Old 02-15-2008
Use the cron mechanism.

man cron or Google on it.

Regards
# 3  
Old 02-15-2008
Thats not really a scripting thing, but you can schedule this using cron
Try typing crontab -e to edit the crontab with your default editor

The way this file is configured will depend entirely on how often you want this operation performed, and at which times/days etc.
Then you should be able to use a simple mv.

If you can provide the time/date etc I can give you more specific instructions.
# 4  
Old 02-15-2008
the files should be moved at 6 am EST everyday, and only once.

"
Quote:
Originally Posted by magik
Thats not really a scripting thing, but you can schedule this using cron
Try typing crontab -e to edit the crontab with your default editor

The way this file is configured will depend entirely on how often you want this operation performed, and at which times/days etc.
Then you should be able to use a simple mv.

If you can provide the time/date etc I can give you more specific instructions.
"
# 5  
Old 02-15-2008
You should have all you need. This kind of task is exactly what cron was designed to do.

Just google "cron" or "cron tutorial" or "cron examples" to get exact step by step ways of doing what you need. You could run "man cron" too, but that will probably be a bit of an information overload for what you need, but ultimately will contain the answer as well.
# 6  
Old 02-15-2008
Thx.. all for the info....

Quote:
Originally Posted by goldfish
You should have all you need. This kind of task is exactly what cron was designed to do.

Just google "cron" or "cron tutorial" or "cron examples" to get exact step by step ways of doing what you need. You could run "man cron" too, but that will probably be a bit of an information overload for what you need, but ultimately will contain the answer as well.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed in Korn Shell scripting

#! /bin/ksh while read line do if ] ; then echo "no data" continue; fi echo "performing operation on $line" done < prg.txt (3 Replies)
Discussion started by: Juhi Kashyap
3 Replies

2. Shell Programming and Scripting

Help needed with Shell scripting

Hi All, I need to split a flatfile based on it's first character, I am using the following script awk '{print > "TEST_substr($0,1,1).txt"}' PROVIDER.txt It is returning files TEST_1 and TEST_2 But I am not getting the .txt file extension. I need the files like TEST_1.txt and ... (1 Reply)
Discussion started by: sam35
1 Replies

3. Shell Programming and Scripting

Help needed in ksh scripting

I got a task to do today, I want to write a script for the following 1) Archive log more than 2 days old 2) Number of days the current Archive logs present 3) Total number of archive logs 4) Size of each archive log 5) When was last successful backup happened? Can I get a general script... (8 Replies)
Discussion started by: Rambo
8 Replies

4. Shell Programming and Scripting

Help needed for shell scripting for oracle.

Hi, Please see contains both files created for automating the data from oracle through shell. 1)a_p.ksh #!/bin/ksh LOG=/home/A_P.log MESSAGE=/home/MESSAGE_A_P.txt mail_list=/home/AP_MAIL_LIST.txt data=/home/spooled_A_P.log echo "`date` Starting execution for A_P COUNT" > $LOG ... (2 Replies)
Discussion started by: fidelis
2 Replies

5. Shell Programming and Scripting

ksh scripting help needed.

I am trying to create a script to manipulate numerous file and at first I thought it would be a simple task but at this point i am ready to break my computer! I am new to unix scripting so hopefully someone out there thinks this is super easy and can help me out! A sample of the problem file is... (2 Replies)
Discussion started by: theqcup
2 Replies

6. Shell Programming and Scripting

Help needed in shell scripting

" how to write a script to send an error in a log file to a particular E-Mail ID " Can anyone help me in this ? Regards (3 Replies)
Discussion started by: himvat
3 Replies

7. Shell Programming and Scripting

SHell Scripting Help Needed

Dear All, I have an input file like this interface Serial10/0/7:11.1 point-to-point description CLIENT:SA_INSTITUTO ANGLO MEXICANO Sitio Metepec 104452:0,165 bandwidth 64 ip vrf forwarding INSTITUTO-ANGLO ip address 192.168.148.217 255.255.255.252 no ip directed-broadcast frame-relay... (2 Replies)
Discussion started by: cskumar
2 Replies

8. Shell Programming and Scripting

Help needed - shell scripting

I have a file that has text in the format below ABC / Some text / ABC / Some text / ABC / Some text / ABC / Some text / ABC / Some text / How can I seperate the text between a pair of 'ABC' into seperate files ??? any information would be of great help. Thanks (8 Replies)
Discussion started by: garric
8 Replies

9. Shell Programming and Scripting

help needed in shell scripting......urgent

Dear friends, please help me to solve following problem. I'm running a frontend application from which i'll be invoking the shell script with arguments as given below -driver -w -p "ABC XYZ" -S -ds con -dn "abc xyz" i am getting $1=-driver $2=-w $3=-p $4="ABC $5=XYZ" $6=-S $7=-ds... (3 Replies)
Discussion started by: swamymns
3 Replies
Login or Register to Ask a Question