can someone look into this one please... I am struck at this point. I do not know what logic to be followed here. I can go ahead with my work only, if this step is done. Please Help.
I have a process X in a shell script. Once the process X is done, it generates a log file. Process X is basically a java application. We cannot assume how much time would be required for the process X to be completed once it is kicked off..
The shell script looks something like this:
I should write a shell script "Y" in such a manner, that my shell script "Y" should be able to
1. check as and when the log file from the process X is created.
2. once the log file is created, my script "Y" should be able to move the created log file to a different directory.
that is my script Y should automatically move the newly created log files to a different directory, immediately after the log file is created. I am not able to understand the logic here.
The safest thing to do is change process X, do not create a process Y.
Otherwise you are stuck with a kludge-y kind of thing where you call lsof or fuser repeatedly until you see that the logfile is no long open. See the man page on your system
example:
This does a lot of pointless polling. If your system has inotify (Linux/GNU derivative) you can call inotify to see when a file is closed. Same polling problem though.
What I have:
I have a input.sh (script which basically connect to mysql-db and query's multiple tables to write back the output to output1.out file in a directory)
note: I need to pass an integer (unique_id = anything b/w 1- 1000) next to the script everytime I run the script which generates... (3 Replies)
Hi,
As a Oracle Developer, I am writing many Procedures,Functions and Packages. Facing Many optimization issue after writing these Database objects. Trying to tune it manually.
Can we write any Shell/Perl/Python script to Optimize these Database objects instead of doing manual check and... (1 Reply)
Hello All ,
I came across a tricky solution to devolop . Here is a part of the requirement automation .
I have different set of server say : Web ( has 4 servers under it ) , App ( has 4 servers under it ) , DB ( has 2 servers under it )
Above each i have different load balancers , Say : Web... (4 Replies)
Hi Gurus,
I have a clearcase script that i use to check in a single file at time on my clearcase server. the script is as follows
setmyview
settask 75098_MSI_TRILOGY_EIM
cd /vobs/Trilogy_R12/custom/msieim/12.0.0/sql/
cleartool co -nc .
ct mkelem -nc Filename_1.sql
cp... (3 Replies)
Hi,
I am very new in shell scripting. Have managed to prepare a script which will work to download data to local directory. But facing below problem. :wall:
Please help me out. Thanks in advance.
Problem:
1. I am unable to use delete command to delete data in the ftp location (I have... (2 Replies)
Hi All,
Consider my script is getting input from user under utc/stb path. I should automate the script by reading inputs from .txt file. Whenever script is prompting for input, it should read from input file. Now, i have to create a script in different path that should run my old script by... (4 Replies)
I got the task writting Korn Shell script to automate the tuxedo login so that users neednot have to enter options manually. I have done that using expect tool from the Unix but my manger told me its not secure so you have to do that using Kornshell without using Expect. Here is the way to login to... (0 Replies)
Hi,
I have got a requirement like this.
a parameterized function custFtp which will take 5 i/ps and will do the following tasks.
p1) server name
p2) username
p3) password
p4) path name of the server where the file resides
p5) file name pattern
the function will work like this.
... (1 Reply)
Hi,
I'm trying to write a shell script that has a menu and then dependant on the selection, will automate some samba file transfer.
The problem is when I run the code without the case statement it runs fine. but when I put the case statement in the only way I can get the code to run is to... (6 Replies)