I need to remove the file entries that are 30 days old. I have a file with the below data.
After applying the script to the file, the output should be as follows.
The lines which is old more than 30 days should be removed from the output.
I have a file with multiple lines, lets say for example
magazine1
magazine2
magazine3
magazine3
magazine4
magazine5
So i am trying to find a way to find and delete the duplicate entries.
Any ideas?
Thanks (3 Replies)
I am new to Linux and would appreciate some help. I need a script to do the following:
My file contains the following entries
more file
1
1
1
1
2
2
2
I want to delete multiple entries of 1 and 2 and just keep one of each. The output should look like
more file
1
2
Thanks (1 Reply)
OK, best is I explain what the operating enviroment is.
Linux, but Motomagx. It is a Linux operated mobile phone, Motorola V8.
I am writting a shell script, but got stuck.
I have to delete the complete content of file 1 in file 2.
I have attached the 2 files.
You can see that the content of... (2 Replies)
Good evening you scripting guru's!
I have the following script to delete a file on logout of a Mac :
find . –name com.apple.sidebarlists.plist –exec rm -f {} \;
It works fine in terminal and when logging out. However, it takes forever to run the script at logout...A minute and a half.
... (12 Replies)
Hi there,
i have a question.
I have a folder called /usr/test
There is a file in it.... test.csv
I need not a shell script that checks if there is a file called: test.del
And if the file is in the same folder then the script should delete the test.csv and also the test.del.
Hope... (9 Replies)
Hello,
I have following log file.
alog.log
Oct 8 xxxxx
Oct 9 xxxxx
Oct 10 xxxxx
Nov 8 xxxxx
Nov 8 xxxxx
.
.
.
Jan 8 xxxxx
I need to delete all the lines which are having date entries older than 60 days. So If the current date is Jan 9 2011 then it should delete all the lines upto... (3 Replies)
ENVIROMENT
Linux: Fedora Core release 1 (Yarrow)
iPlanet: iPlanet-WebServer-Enterprise/6.0SP1
Log Path: /usr/iplanet/servers/https-company/logs
I have iPlanet log rotation enabled rotating files on a daily basis.
The rotated logs are NOT compressed & are taking up too much space.
I... (7 Replies)
Hi
Iam having file like below
10.238.52.65 pun-ras-bng-mhs-01 server
10.238.52.65 pun-ras-bng-mhs-01 10.10.10.10
10.238.52.65 pun-ras-bng-mhs-01 10.10.20.10
10.238.54.1 enk-ras-bng-cse-01 server
10.238.54.1 enk-ras-bng-cse-01 10.10.30.10
10.238.54.1 enk-ras-bng-cse-01 10.10.10.10
... (5 Replies)
Hi Guru's
The script has to read an entry from one file and delete the set of lines form other file. Below is the format of the file. In the below example, script should read the entries from input file 2 and delete the entries from input file 1.
Input file 1
cn: test@test1.com
abc:... (7 Replies)
Discussion started by: Samingla
7 Replies
LEARN ABOUT ULTRIX
condredirect
condredirect(1) General Commands Manual condredirect(1)NAME
condredirect - perhaps redirect mail to another address
SYNOPSIS
in .qmail: |condredirect newaddress program [ arg ... ]
DESCRIPTION
condredirect feeds each new mail message to program with the given arguments. If program exits 0, condredirect forwards the mail message
to newaddress, and then exits 99, so further commands in .qmail are ignored.
If program exits 111, condredirect exits 111, so delivery will be retried later.
If program exits anything else (or does not exist), condredirect exits 0, so the rest of .qmail will be processed as usual.
Note that it is not safe for program to fork a child that reads the message in the background.
WARNING: If you create a .qmail file to enable condredirect, make sure to also add a line specifying delivery to your normal mailbox.
SEE ALSO bouncesaying(1), except(1), dot-qmail(5), qmail-command(8), qmail-queue(8)condredirect(1)