I wish to seach a Dir for a specific file, once the file is found i will perform additional logic. If the file is not found within two hours, i would like to exit.
Logically, I'm looking for the best way to approach this
Thanks for any assistance in advance.
Note: I'm using a C shell and... (2 Replies)
We have data files that are ftp'd every morning to a SUN server. The file names are exactly the same except for that each has the date included in its name. I have to write script to do 2 things:
STEP 1) Verify that the file arrived in morning.
STEP 2) Compare the file size of the current... (3 Replies)
Hi,
if I have a lot of files like (AABBCC0010, AABBCC0011, AABBCC0012....AABBCC1000), can I write a small script to check any sequence number jump and show me the result which sequence number?
#The first sequence may start from 0010 or 0101... :confused:
Thank you!! (10 Replies)
All,
Is there a way to keep checking for a file over and over again in the same script for an interval of time?
Ie
If {
mail -user
continue checking until file arrives
file arrives
tasks
exit
I don't want the script to run each time and email the user each time a file... (4 Replies)
I have a script to check a file sequence for missing frames. It used to work in true Unix but now on OSX 10.6.4 (bash) it reports every frame is missing. Hopefully someone here can help.
#!/bin/csh -f
if ($#argv < 1) then
echo
echo "Usage: checkseq <name> "
echo... (3 Replies)
Hi,
I am looking for a shell script with the following.
1. It should check whether a particular file exists in a location
#!/bin/sh
if ;
then
echo "xxx.txt File Exists"
else
echo "File Not Found"
fi
2. If file exists, it should check for the modified date and run a command... (2 Replies)
Hi all,
I have a file like this
ID 3BP5L_HUMAN Reviewed; 393 AA.
AC Q7L8J4; Q96FI5; Q9BQH8; Q9C0E3;
DT 05-FEB-2008, integrated into UniProtKB/Swiss-Prot.
DT 05-JUL-2004, sequence version 1.
DT 05-SEP-2012, entry version 71.
FT COILED 59 140 ... (1 Reply)
I want to listed files every hours and check the missing sequence
my file format is
CV.020220131430.txt
CV.020220131440.txt
CV.020220131450.txt
CV.ddmmyyhhm.txt
how to check if i have missing files in sequence ..
thanks (3 Replies)
Hi All,
I have a requirement that i need to list only the missing sequences with a unix script.
For Example:
Input:
FILE_001.txt
FILE_002.txt
FILE_005.txt
FILE_006.txt
FILE_008.txt
FILE_009.txt
FILE_010.txt
FILE_014.txt
Output:
FILE_003.txt
FILE_004.txt
FILE_007.txt
FILE_011.txt... (5 Replies)
Discussion started by: Arun1992
5 Replies
LEARN ABOUT SUNOS
ypxfr_1perday
ypxfr(1M) System Administration Commands ypxfr(1M)NAME
ypxfr, ypxfr_1perday, ypxfr_1perhour, ypxfr_2perday - transfer NIS map from a NIS server to host
SYNOPSIS
/usr/lib/netsvc/yp/ypxfr [-c] [-f] [ -C tid prog server] [-d ypdomain] [-h host] [-s ypdomain] mapname
DESCRIPTION
The ypxfr command moves an NIS map in the default domain for the local host to the local host by making use of normal NIS services. It
creates a temporary map in the directory /var/yp/ypdomain (this directory must already exist; ypdomain is the default domain for the local
host), fills it by enumerating the map's entries, fetches the map parameters (master and order number), and loads them. It then deletes any
old versions of the map and moves the temporary map to the real name.
If run interactively, ypxfr writes its output to the terminal. However, if it is started without a controlling terminal, and if the log
file /var/yp/ypxfr.log exists, it appends all its output to that file. Since ypxfr is most often run from the privileged user's crontab
file, or by ypserv, the log file can retain a record of what was attempted, and what the results were.
For consistency between servers, ypxfr should be run periodically for every map in the NIS data base. Different maps change at different
rates: a map might not change for months at a time, for instance, and can therefore be checked only once a day. Some maps might change sev-
eral times per day. In such a case, you might want to check hourly for updates. A crontab(1) entry can be used to automatically perform
periodic updates. Rather than having a separate crontab entry for each map, you can group commands to update several maps in a shell
script. Examples (mnemonically named) are in /usr/sbin/yp: ypxfr_1perday, ypxfr_2perday, and ypxfr_1perhour.
Refer to ypfiles(4) for an overview of the NIS name service.
OPTIONS -c Do not send a "Clear current map" request to the local ypserv process. Use this flag if ypserv is not running
locally at the time you are running ypxfr. Otherwise, ypxfr complains that it cannot communicate with the local
ypserv, and the transfer fails.
-f Force the transfer to occur even if the version at the master is not more recent than the local version.
-C tid prog server This option is for use only by ypserv. When ypserv starts ypxfr, it specifies that ypxfr should call back a yppush
process at the host server, registered as program number prog, and waiting for a response to transaction tid.
-d ypdomain Specify a domain other than the default domain.
-h host Get the map from host, regardless of the master. If host is not specified, ypxfr asks the NIS service for the name
of the master, and tries to get the map from there. host must be a valid host name.
-s ypdomain Specify a source domain from which to transfer a map that should be the same across domains.
FILES
/var/yp/ypxfr.log Log file
/usr/lib/netsvc/yp/ypxfr_1perday Script to run one transfer per day, for use with cron(1M)
/usr/lib/netsvc/yp/ypxfr_2perday Script to run two transfer per day, for use with cron(1M)
/usr/lib/netsvc/yp/ypxfr_1perhour Script for hourly transfers of volatile maps
/var/yp/ypdomain NIS domain
/usr/spool/cron/crontabs/root Privileged user's crontab file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
ypxfr Only
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
ypxfr_1perday, ypxfr_1perhour, and ypxfr_2perday
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWypu |
+-----------------------------+-----------------------------+
SEE ALSO crontab(1), cron(1M), ypinit(1M), yppush(1M), ypserv(1M), ypfiles(4), attributes(5)SunOS 5.10 11 Mar 1998 ypxfr(1M)