Since no one is trying to answer, I will give it a try to see if it can fit your requirement
Assuming each server is consuming the files one at a time, we may be able to run 'cksum' on the files and take the modular to determine if the file is meant for a particular server to process.
Suppose you have 3 servers (server1, server2, server3). server1 will consume any file cksum%3==0, server2 will consum any file cksum%3==1, etc
For server1, this is the code to pick up the first file to process
If you still want to use some form of locking mechanism, try 'flock' (managing lock from shell script)
Hi guys,
I am trying to store some output in a file and then compare it to another file.
I am gathering information from 2 commands:
cat /opt/jbin/server.log.tmp > A
grep "ephemeral" /opt/jbin/log/server.log.2015-05-02-18 > B
The contents of both file are the same. This means if I do a... (3 Replies)
hi all,
I had my script as
a=qw
b=rter
c=fdfd
curency=1000
printf"${curency} $a $b $c" > filename
can i have printf statement that can change the currency from 1000 to 1,000 like it should convert the number to currency format ..?(i.e for any number) (14 Replies)
Hi,
I'm running a script which would ssh to various ssh-trust enabled servers and get a list of packages installed. The output of this command would be redirected to a file
ssh -q $i 'rpm -qa --queryformat '%{NAME}\t\t,%{ARCH}\t\t,%{VERSION}-%{RELEASE}\t\t,%{INSTALLTIME:date}\n'|sed... (2 Replies)
Hi guys,
I have just been bothered by a fairly small issue for some time now. I am trying to search (using find -name) for some .jpg files recursively. This is a Redhat environment with bash.
I get this job done though I need to copy ALL of them and put them in a separate folder BUT I also... (1 Reply)
I have a system where i take hourly back-ups of the system.The script for maintaining full backup for the last 5 days is
find /backup/server -type f -mtime +4 -exec rm -f {} \;
works fine for keeping the files of some 5 days old.
In the case of hourly backups.How do we write to keep... (2 Replies)
How can I use awk command to convert values to currency. For example I have a database like follows
John:200
smith:300
kim:405
and want it to out put like this
John $200.00 (3 Replies)