Okay, I have two scripts, the first one does some stuff, and comes to a point where it has this:
Right here it runs a quick script to start something that writes to a log file.
This calls another script that does basically the same thing:
Before this line it calls a script that starts something that prints to a log.
My logic may be way off here, but what I need is the following:
The first script shuts down the two servers, then it cd's to a directory, deletes some directories and then re-creates them, then it starts the first server. Once that server prints the line in the first CODE box, it should run the second script, which runs another script that starts a different server. once the line in the second CODE box is printed, it should echo Marker Reset Complete, and then exit the script it's in, as well as then exit the first script.
Right now, it seems to run perfect until the end, then at the end it prints the marker reset complete line, but then it doesn't do anything for 20-30 seconds until it FINALLY exit's.
---------- Post updated at 02:05 PM ---------- Previous update was at 10:46 AM ----------
I'm sure this isn't the most efficient way to accomplish what I'm trying to do, but has anyone seen this issue before when after tailing a file and reading it for a line you get a long delay after the line is found and the script is supposed to go on tot he next step?
---------- Post updated 08-06-09 at 09:06 AM ---------- Previous update was 08-05-09 at 02:05 PM ----------
someone out there has to have an idea on this.
---------- Post updated at 02:50 PM ---------- Previous update was at 09:06 AM ----------
Here is my solution, not exactly the way I originally wanted it, but this runs much quicker and more efficiently.
In the bash below I am searching the filevirus-scan.log for the Infected files: 0 line (in bold) and each line for OK.
If both of these are true then the function execute is automatically called and processing starts. If both these conditions are not meet then the line in the
file is sent to the... (2 Replies)
Hi All,
I have one shell script start.sh which executes another shell script test.sh something like below :test.sh -param1 -param2
In the test.sh there is one command for removing file:rm file1.bak
I want whenever I execute start.sh, it will execute test.sh and if it finds string rm... (7 Replies)
I'm facing issues in executing the bash script of mine. This script will pick the latest file received and connects SFTP server and files is placed on this remote server.
Error message
Enter password:
"File movement"
sftp> cd Test
sftp> put Test_File_201309.txt
File "Test_File_201309.txt"... (6 Replies)
# check host value regex='^(||1|2|25)(\.(||1|2|25)){3}$' if ')" != "" ]; then if ]; then echo host $host not found exit 4 fi elif ]; then echo $host is an invalid host address exit 5 fi
espeacailly the top regex part?
---------- Post updated at 06:58 PM ---------- Previous update was... (1 Reply)
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Hi I need a bash script that can search through a text file and when it finds 'FSS1206' I need to put a Letter F 100 spaces after the second instance of FSS1206
The format is the same throughout the file I need to repeat this on every time it finds the second 'FSS1206' in the file
I have... (0 Replies)
I'm trying to write a simple shell script that looks at a given text file and if the only word in the file is 'completed', it launches another shell script.
So far I have this almost working...
if grep 'completed' $datafile
then...
however, using this logic the secondary shell script... (3 Replies)
Hi everyone, I'm trying to write a script to format a file using unix2dos. I want to output all but the first 14 lines in a file. Then I want to pipe this to unix2dos to convert the output to a file that's easily readable on windows. Here's what I have:
export Lines=`wc -l < $1`
export... (11 Replies)
Hi All,
Linux lxs3er06 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
Issue:
While executing shell scripts in bash shell, following error messages are thrown:
rm:command not found
On doing little investigation, I added '/bin' to $PATH and on doing echo... (9 Replies)
Hi,
I need to monitor a log file for a certain string ("Phase 2 ended") which indicates that the job which creates the log file has finished loading its data file. Once the string "Phase 2 ended" is found in the log file I would then like to stop checking that log and check to see if another... (3 Replies)