I have to make a bash script that do a gzip of a file if is older than 60 days, and move it in a subdir which name is the beginning of the filename.
I have an SQL fact table which is used for looking up a date and returning another date.
The table schema is as follows:
TABLE date_lookup
(
pk_date DATE,
plus1_months DATE,
plus2_months DATE,
plus3_months DATE
);
UNIQUE INDEX on date_lookup(pk_date);
I have a load file (pipe delimited) containing dates from 01-28-2012 to 03-31-2014.
The following is an example of the load file:
01-2
Hi All,
Can someone help steer me to the simplest approach to write a script that reads the second column of a csv file and returns the highest value.
example file:
DATE,QUANTITY
Mon Apr 30 01:56:00 2012,42
Mon Apr 30 02:24:00 2012,72
Mon Apr 30 02:56:00 2012,102
Mon Apr 30 02:59:00 2012,132
Mon Apr 30 03:31:00 2012,222
Mon Apr 30 03:38:00 2012,192
TIA
Or zip VS gzip VS bzip2 VS xz
In a previous article about the tar program I mentioned gzip and bzip2 compression methods as options to create a tarball (and I forgot xz).
To make amends today I will introduce the main methods to compress the file and I’ll do some tests to see how they behave.
HI all ,
i want to make an automatic script using if / while to search for files in folder
and get the least by date and gzip them ( last 70 file )
/file/home/logs
30 files in 11/2012
45 files in 10/2012
30 files in 9/2012
10 files in 8/2012
so it get 10 + 30 + 30 ( from 10 ) and gzip them
what about my script
Code:
for sourcefile in `ls -rt *.txt`
&n
I have a file cccam.cfg
which contains line like that
Code:
F: user pass 1 0 0 {0 0 1} # 24-02-2013
F: user1 pass1 1 0 0 {0 0 1} # 01-11-2012
I want a script that adds the symbol # before the line that the date has expired
like this
Code:
# F: user1 pass1 1 0 0 {0 0 1}# 01-11-2012
but in the same file cccam.cfg
and thank you
---------- Post updated at 04:55 PM ---------- Previous upd
Hi,
I'm quite new to ksh scripting, can someone help me with this.
Requirements:
I need to create a script that list the files from a user input date range.
e. g.
Hi,
I'm quite new to ksh scripting, can someone help me with this.
Requirements:
I need to create a script that list the files from a user input date range.
e. g.
Hi All,
Request your expertise in tackling one requirement in my project,(i dont have much expertise in Shell Scripting). The requirement is as below,
1) We store the last run date of a process in a file. When the batch run the next time, it should read this file, get the last run date from the file.