Sequence means.....like from sept to till date ...we need find that every day is present or not....like the sequnce of dates (like from day 1 to 31 or 30 we need to have every day) and 12775048994_125342__***(text)_201010010800.txt ---------bold ones are need to checked its based on date ..but the first big numbers are dynamic ones ..they all not same for every day..it will be generated dynamically.......(all txt names are dynamically generated except the text what i have mentioned... it depends on market name..but it doesn't matter)..
1) Which OS do you run ?
2) So you want your script to take 2 input arguments in format YYYYMMDD, and then, for every day in between these date, it check whether it can find an existing file with the concerned day in a directory that have a corresponding name, so the file should have the generic form :
./YYYYMMDD/<any_number>__*(text)_YYYYMMDD.txt file
???
also handle leap year
Or here is a better version that includes runtime improvement :
Scanning from 20090101 to 20101122 came from :
Basically :
After adding just the single + 8870 iteration saving it decreased to :
And using built-in variable and +70 and +71 iteration saving we finally come to the runtime:
Here is the code (feel free to use and adapt to your needs)
For your information, i tested it on
as well as
thanks a lot for your time..
i am workin on putty ...and my servers are built on UNIX platform (i am not sure)
the file naming convention is like this 12775048994_125342 __***(text)_201010010800.txt
Italic ones are random numbers which will be in increasing order (we don't bother about it....) but, if we check it would be fine.....
thanks a lot for your time..
i am workin on putty ...and my servers are built on UNIX platform (i am not sure)
the file naming convention is like this 12775048994_125342 __***(text)_201010010800.txt
Italic ones are random numbers which will be in increasing order (we don't bother about it....) but, if we check it would be fine.....
To know on which unix plateform you are, use the command
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
hey how u doing guys ... I'm a student @ EMU and taking a beginner Linux class and I have those two extra credit project that im struggling with so I hope to get some correction and help
write a shell script that will
1-prompt the user for a file name
2-check to see if the file exists... (2 Replies)
Hi all...
Please help me with this questions.
I am not good at shell scripting.
1) It seems like there are many ways that we can run the shell scripts.
what is the difference between each one?
i)./shell_script.sh
ii).(space)./ shell_script.sh
iii)sh shell_script.sh
... (3 Replies)
i want use ssh on the host01 to execute autoexec.sh on the host02 like following :
host01> ssh host02 autoexec.sh
autoexec.sh include nohup command like follwing :
nohup /home/jack/deletedata.sh &
after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
1.Display a list of /usr/share/doc subdirectories containing information about shells.How many README files do these subdirectories contain? Don't count anything in the form of "README.a_string".
2.Make a list of files in your home directory that were changed less that 10 hours ago, using grep,... (2 Replies)
The first step for you to create the script to change “JAVA_OPTS” variable definition as follows:
Original line:
JAVA_OPTS="-Dname=$JAVA_NAME -Xmx$JVM_MAX -DAGENT_HOME=$RT_HOME -DINSTALL_DIR=$RT_HOME -Djavax.net.ssl.keyStore=$RT_HOME/conf/client.keystore ... (3 Replies)
hi friends,
i m tryin to load data from one set of table to other i have sql procedure al ready for it..!
i m going to load the procedure only if data in one of my table for example
table "landing " have 10 records each attribute of this table is
file_name status date ... (2 Replies)
I just want the output of this command to be stored in a variable like,
str = `grep Application.dbName serverdata/ServerProp.txt`
but while executing it says like,
str : startup 11: not found, where startup is the script name.
but while running the command alone like,
grep... (2 Replies)