Looking for a perl script (windows) to delete the contents of a file
Hi All,
Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup.
Remember, the file gets generated when the related service starts. My condition is that I should not stop the service to delete the file.
I have attached a perl script that I used for the above said. It takes a backup but not moving the file. Immediate help will be highly appreciated.
Hi all,
I have two log files A and B. Where files A have 10 lines and file b has 5 lines.
Out of them 3 lines are common to both of them. I want to compare both the files and want to delete the common data from file A(file B should remain as it is)
example :
file A :
1
2
3
4... (5 Replies)
Hi All,
Sorry to ask this question and i am not sure whether it is possible. please reply to my question. Thanks in advance.
I need a perl script ( or any linux compatible scripts ) to copy the graphical contents of the webpage to a word pad.
Say for example, i have a documentation site... (10 Replies)
Hi
My requirement is to read the contents of a fixed length file and validate the same.
But am not able to read the contents of the file and when i tried it to print i get <blank> as an output...
I used the below satatements for printing the contents
... (3 Replies)
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Hi,
I have the file like this:
#Contents of file 1 are:
Dec 10 12:33:44 User1 Interface: Probe
Dec 10 12:33:47 uSER1 SOME DATA
Dec 10 12:33:47 user1 Interface: MSGETYPE
Dec 10 12:34:48 user1 ID: 10.
Dec 10 12:33:55 user1 Interface: MSGTYPE
Dec 10 12:33:55 user1 Id: 9
... (1 Reply)
Hi ,
I am trying to make a cron job to delete the contents of a directory in a linux environment.The contents created before 2 days should get deleted by this job.Here is what i have written :
/usr/bin/find / -name *.log -ctime +2 -exec /bin/rm -f {} \;
Is it correct....If not so,please... (9 Replies)
Hi,
I want to delete the contents of a file which are matching with contents of other file in shell scripting.
Ex.
file1
sheel,sumit,1,2,3,4,5,6,7,8
sumit,rana,2,3,4,5,6,7,8,9
grade,pass,2,3,4,5,6,232,1,1
name,sur,33,1,4,12,3,5,6,8
sheel,pass,2,3,4,5,6,232,1,1
File2... (3 Replies)
I have a function which does awk proceessing
sub mergeDescription {
system (q@awk -F'~' '
NR == FNR {
A = $1
B = $2
C = $0
next
}
{
n = split ( C, V, "~" )
if... (3 Replies)
All,
I have an excel sheet Excel1.xls that has some entries.
I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls
These may be in different workbooks. They are totally independent made by 2 different users.
I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies
LEARN ABOUT DEBIAN
backup-whatsthis
BACKUP-WHATSTHIS(1) Chiark-backup BACKUP-WHATSTHIS(1)NAME
backup-whatsthis - read an id off a tape and display it
SYNOPSIS
backup-whatsthis [--list [n]]
DESCRIPTION
`backup-whatsthis' is a simple script to display the TAPEID of the current tape and optionally list its contents. This script is a bit of
a hack and may not be fully reliable.
OPTIONS --list [n] Print TAPEID then list archive n (default 0). Note that archives are numbered from zero.
FILES
/etc/chiark-backup/settings.pl
Configuration file for the whole of chiark-backup
BUGS
`backup-whatsthis' is currently hardwired to assume `cpio' type backups when listing; it could be trivially hardwired to assume `zafio' or
with slightly more effort it could be done properly :->.
AUTHOR
This Manual page was written by Matthew Vernon <matthew@debian.org> but may be used by anyone.
COPYRIGHT
Copyright (C) 1997-1998,2000-2001 Ian Jackson <ian@chiark.greenend.org.uk>
Copyright (C) 1999 Peter Maydell <pmaydell@chiark.greenend.org.uk>
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
Debian July 2003 BACKUP-WHATSTHIS(1)