Automation of manual process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automation of manual process
# 1  
Old 12-01-2010
Automation of manual process

my problem step by step...
1.I have 5 files at the location (/usr/abc) for example
file1, file2, file3, file4 and fe.ok

2. I have to transfer 2 of the above files from which one is fixed file (fe.ok) for example file1 and fe.ok to usr/dob using cp command.

3.After transferring i will execute my_script.ksh which will read the 2 files, file1 and fe.ok do some manipulation and delete these 2 files.

4. As soon as step 3 is completed, again i have to transfer next set file2 and fe.ok to the same location usr/dob and run my_script.ksh which will read the 2 files, file2 and fe.ok do some manipulation and delete these 2 files.

5. As soon as step 4 is completed, again i have to transfer next set file3 and fe.ok to the same location usr/dob and run my_script.ksh which will read the 2 files, file3 and fe.ok do some manipulation and delete these 2 files.

6. As soon as step 5 is completed, again i have to transfer next set file4 and fe.ok to the same location usr/dob and run my_script.ksh which will read the 2 files, file4 and fe.ok do some manipulation and delete these 2 files.

Hope this will give a clear understanding what is happening....
this is a pure manual process and wanted to automate this..

For transferring i use a simple cp command and then run my_script.ksh from the same location usr/dob..

PLs suggest.Its Urgent
# 2  
Old 12-01-2010
This is a duplicate of:
https://www.unix.com/unix-advanced-ex...utomation.html

Maybe someone else can understand the requirement?
# 3  
Old 12-01-2010
Code:
DirFrom=/usr/abc
DirTo=/usr/dob

cd $DirFrom
cp fe.ok $DirTo

ls *|grep -v fe.ok |while read file
do
  cp $file $DirTo
  echo "working on $file and fe.ok"
  $DirTo/my_script.ksh 
  rm $DirTo/$file
done

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Manual fsck help in fedora

I am trying to do a manual fsck in Fedora. So far I have not had any luck. I have tried the easy way like this. sudo touch /forcefsckSince that didn't work I tried the manual way. sudo fsck.ext4 /dev/mapper/vg_hi-lv_home sudo fsck.ext4 /dev/mapper/vg_hi-lv_rootSince I got mounted errors I... (5 Replies)
Discussion started by: cokedude
5 Replies

2. Shell Programming and Scripting

creating an automation process in unix .

hi i need shell script in ksh for the automation process in informtica. The automation process is like this . i have a folder in unix . when this folder gets updated (like if a file or files is/are added to the folder) an event in informatica is triggered and after the process is done in... (2 Replies)
Discussion started by: kumar8887
2 Replies

3. Shell Programming and Scripting

No Manual Entry

Hi, While executing the following command i am getting output as command not found. iostat output: command not found Also, man iostat is displaying "NO Manual Entry" Why is it so? (5 Replies)
Discussion started by: salil2012
5 Replies

4. Shell Programming and Scripting

Exiting a manual

I'm sure it's really easy, but I have searched on Google and on the forums and haven't found anything. For instance, if I open the grep manual (man grep), I can't close it. I've tried ctrl+c, ctrl+x, scrolling to the bottom of the manual. How can I exit the manual without closing the shell? ... (8 Replies)
Discussion started by: dennis89
8 Replies

5. Shell Programming and Scripting

Need help with a manual task

I have an ASCII file that I receive on a monthly bases that is fixed length. I break the file into separate files based on a 5 character numerical sequence. I have 20 different sequences I have to find. the input file looks something like this xy-ins 2008yuthnrlsinrthsntwilgrha33260001... (4 Replies)
Discussion started by: jcalisi
4 Replies

6. Shell Programming and Scripting

NDM manual

Hi, Can any of you tell me how to get this ndm manual stuff? I need it to know specific error ids and descriptions Thanks, Vinodhini (1 Reply)
Discussion started by: vinodhini4
1 Replies

7. UNIX for Advanced & Expert Users

process automation ...help needed

hi all i am working in a organisation where we are using Ab Initio tool for datawarehousing purpose.Ab initio is installed on a unix environment.after developing the code we migrate it to production using certain commands which gets executed in the unix box.there are specific number of predefined... (6 Replies)
Discussion started by: dr46014
6 Replies

8. Shell Programming and Scripting

unix manual needed :)

hi guys... am new 2 dis unix world... am in need of a unix manual... cud sum1 pls post sum links 2 download it?>?>? :confused: Danks in advance... ;) ;) ;) (1 Reply)
Discussion started by: sundar_shankar
1 Replies

9. OS X (Apple)

UNIX Commands / Manual

Hi Does anyone know were to go (web link please?) to learn the BACIS of UNIX in OS X, I would like to know a little more about unix (for the apple) but seem to get lost in all the wen sites, and idealy find a site where i could download a manual for the unix shell in OS X. Any ideas? (4 Replies)
Discussion started by: adrianmoore
4 Replies

10. UNIX for Dummies Questions & Answers

No manual entry for

I don't seem to be able to get man pages up for any command. When I try the "No manual entry for..." message is displayed. When checking my $MANPATH variable I get the following /opt/SUNconn/man: However, when I check this directory it doesn't exist. Searching for any man directories results... (3 Replies)
Discussion started by: FattyLumpkin
3 Replies
Login or Register to Ask a Question