Ok, i have a problem and not sure how to tackle this one as of yet.
I will have this job running in the cron every 5 minutes, i need it to check a directory for 5 files. These files are put into a directory from five different servers.
These 5 files will only have one part different in them, and that is what server they have come from. I need to check for these different files. I have put the file names into an array from a parameter file and just need to check them. the rest of the filename is just the date that the file was created.
is there an easy way to check a directory for the files, and check that each server has sent a file? there could be more than these 5 files in this one directory but they all have the extention .signed.off
once these 5 files are in there i have another process written for it to do something with these 5 files, so thats no problem (atm)
do? i am a bit new, and its not quite doing what i am askign it to do. i have an array of 5 items (0 -4) but this could change so i need it to go for each array (called SC) I have it going through 5 times now using a while loop
signofffiles is the directory where the signofffiles are kept (to be changed when in production) but i am not sure if it is actually going into the direcotry
that i require
this is set as following
the file name structure is scan.batchno.[SC].03.[YEARMONTHDAY].signed.off at this stage the date doesnt really matter but it may do.
at the moment it is saying the files are absent when i have put them in there manually. can anyone see what i have done to make it not work? i am sure somoene can.
Ok i have this... There is just something wrong with the if statement. but other than that it is working. the if statement is always picking up that there is something in $1. For example if the file is not there $1 is
if a file is there, and i can see it it still comes out that the file is absent all the time. can anyone see anything really obvious about this? i am sure there is.
using echo $1 and echo $# as well as the output i am getting the following:
btw thanks so much for your help so far i can feel i am so close. if it is was in vb it would be so simple
Hey Guys and Gals,
I am having trouble with what I thought shouldn't be hard..
In a script I am working on there is a need to enter a MAC address.
MAC addresses are formatted ;
XX:XX:XX:XX:XX:XX
where X can be 0-9, a-f or A-F
So in the sample script the query is something... (4 Replies)
hey Guys, I haven't posted in a while, But you guys were really helpful alst time.
I have had a issue with User Passwords expiring, and since I dont check /var/cron/log on the regular I never know these suers are expiring, making certain nightly jobs not run.
With this script, I want to be... (14 Replies)
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Hi all
I have an input file which contains so many entries like this: And, I want to count hw many among ASN in one column are converted to LYS in third coulmns. which means output shuld contain only "ASN number LYS"
Kindly let me know wny programm for this
My input is
ASN 217 LYS... (2 Replies)
I want to valid a specific word whether it is contained in the text file. For example:
family.txt
father
mother
son
sister
if ("father" contain in family.txt)
do some process
else
do other process
How shell scripting can accomplish this? Anyone can provide helps? (3 Replies)
I have used ps -ef | grep <process name> to see if the process is still running or not. But, not being able to find anything in particular. Any clue on this... (4 Replies)
Hi All,
I am trying to rsync some of the latest files from remote m/c to my local linux box.
Folder structure in my remote m/c looks like this
/pub/Nightly/Package/ROLL/WIN
/pub/Nightly/Package/SOLL/sol
/pub/Nightly/Package/SOLL/linux
Each of the folder contains gzip files which on daily... (0 Replies)
I have a health check script homed in /u/ainet/scripts
I need to check the time stamp on a file in /opt/config/log/
The file is called Backupdisk.out
I want write the same info that you get when you do a ls -l into a file
This is what I have been trying:
cd /opt/config/log/
ls -l | awk... (2 Replies)
Hi
I want to check whether specific process is running or not through a shell script.
ps -ef | grep will tell me this, i tried this way in shell
cnt =`ps -ef| grep xyz | awk '{ END {print NR}}`
if it return two rows, job is running else not.
Is there any better way of doing this. (3 Replies)