03-25-2013
Linux ,bash
The task is to get the archive files based on the no of days given as input which is a parameter and the format of the date is YYYYMMDD
so it looks like YYYYMMDD - $no of days...
20130325 - 5 days
i need to exract all the five days archive files from archive dir..
one option im trying yo use SQL..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am familiar with using the 'date' command to get the current date but I have a situation where I need to get the previous day's date as well as the date two days prior. Theoretically I could use 'expr' to compute these values but I need it to work in instances where the previous month's dates... (2 Replies)
Discussion started by: slant-40
2 Replies
2. Shell Programming and Scripting
Hi all,
I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this:
1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently.
2) So I loaded datafile A... (10 Replies)
Discussion started by: luna_soleil
10 Replies
3. Shell Programming and Scripting
Hi all. I am scripting in a POSIX shell on HPUX.
I am running a script that needs to determine the number of days in a month.
I found this on the forum and it works great:
X=`cal $(date +%m) $(date +%Y) | grep -v '' | wc -w`
The issue is that I am running the script on the 7th day of... (11 Replies)
Discussion started by: lyoncc
11 Replies
4. UNIX for Dummies Questions & Answers
I need to append previous days date to my file which is generated using a script. I am working on Solaris 10. Thanks! (2 Replies)
Discussion started by: Twisha
2 Replies
5. UNIX for Dummies Questions & Answers
Hi i know how to get no of files in some particular folder by following command which includes today and previous days files also
ls |wc -l
but i needed a command in which i can list previous one or two days files only. (4 Replies)
Discussion started by: rahiljavaid
4 Replies
6. UNIX for Dummies Questions & Answers
#!/bin/ksh
day=1
month=1
year=2012
if then
then
prevmonth=31
elif
then
prevmonth=30
elif
then
then prevmonth=29
elif
then prevmonth=29
else
prevmonth=28
fi (4 Replies)
Discussion started by: vagar11
4 Replies
7. Shell Programming and Scripting
Ok, the title is confusing i know, but it is a weird question.
I have a bash script running on Centos5.8 and want to find a better way to do some date manipulation. What i am trying to do is get 3 days of files (day before, that day, and day after), concatenate the three files and pass them on... (2 Replies)
Discussion started by: oly_r
2 Replies
8. Shell Programming and Scripting
---------- Post updated at 03:42 AM ---------- Previous update was at 03:38 AM ----------
Sorry for a duplicate post, my post at the first place could not appear due to some net issue on my machine. Here is what i posted earlier:
Hi, i am using ksh in Solaris, i wanted to assign today's,... (5 Replies)
Discussion started by: pr5439
5 Replies
9. Shell Programming and Scripting
Hello Group,
We want to create a script in order to filter process in the system with more than five days (STIME) and then kill them under Solaris 10.
How can we filter these kind of process ?
ps -efa
Thanks in advance for your help (4 Replies)
Discussion started by: csierra
4 Replies
10. Shell Programming and Scripting
Hi all,
As i am new to shell script.Please help me to write a Shell script to find out process name that are running for last 10 days.
Thank's in advance. (8 Replies)
Discussion started by: manas_1988
8 Replies