Sponsored Content
Top Forums Shell Programming and Scripting Looking for a perl script (windows) to delete the contents of a file Post 302268191 by ntgobinath on Monday 15th of December 2008 07:08:35 AM
Old 12-15-2008
Otherwise, I would like to empty the contents of the file instead of deleting the file. Is it possible?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can i delete the contents of one file based on another file

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)
Discussion started by: rdhanek
5 Replies

2. Shell Programming and Scripting

Perl script to copy contents of a web page

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)
Discussion started by: anand.linux1984
10 Replies

3. Shell Programming and Scripting

how to read the contents of a file using PERL

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)
Discussion started by: meva
3 Replies

4. UNIX for Dummies Questions & Answers

compare 2 file contents , if same delete 2nd file contents

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)
Discussion started by: krishnampkkm
5 Replies

5. Shell Programming and Scripting

Parse file contents in perl...

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)
Discussion started by: vanitham
1 Replies

6. Shell Programming and Scripting

script to delete contents in a directory by date

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)
Discussion started by: d8011
9 Replies

7. Shell Programming and Scripting

I want to delete the contents of a file which are matching with contents of other file

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)
Discussion started by: ranasheel2000
3 Replies

8. Shell Programming and Scripting

Perl script for Calling a function and writing all its contents to a file

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)
Discussion started by: crypto87
3 Replies

9. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

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
QPtrQueue(3qt)															    QPtrQueue(3qt)

NAME
QPtrQueue - Template class that provides a queue SYNOPSIS
#include <qptrqueue.h> Public Members QPtrQueue () QPtrQueue ( const QPtrQueue<type> & queue ) ~QPtrQueue () QPtrQueue<type> & operator= ( const QPtrQueue<type> & queue ) bool autoDelete () const void setAutoDelete ( bool enable ) uint count () const bool isEmpty () const void enqueue ( const type * d ) type * dequeue () bool remove () void clear () type * head () const operator type * () const type * current () const Protected Members virtual QDataStream & read ( QDataStream & s, QPtrCollection::Item & item ) virtual QDataStream & write ( QDataStream & s, QPtrCollection::Item item ) const DESCRIPTION
The QPtrQueue class is a template class that provides a queue. QValueVector can be used as an STL-compatible alternative to this class. A template instance QPtrQueue<X> is a queue that operates on pointers to X (X*). A queue is a first in, first out structure. Items are added to the tail of the queue with enqueue() and retrieved from the head with dequeue(). You can peek at the head item without dequeing it using head(). You can control the queue's deletion policy with setAutoDelete(). For compatibility with the QPtrCollection classes, current() and remove() are provided; both operate on the head(). See also QPtrList, QPtrStack, Collection Classes, and Non-GUI Classes. MEMBER FUNCTION DOCUMENTATION
QPtrQueue::QPtrQueue () Creates an empty queue with autoDelete() set to FALSE. QPtrQueue::QPtrQueue ( const QPtrQueue<type> & queue ) Creates a queue from queue. Only the pointers are copied; the items are not. The autoDelete() flag is set to FALSE. QPtrQueue::~QPtrQueue () Destroys the queue. Items in the queue are deleted if autoDelete() is TRUE. bool QPtrQueue::autoDelete () const Returns the setting of the auto-delete option. The default is FALSE. See also setAutoDelete(). void QPtrQueue::clear () Removes all items from the queue, and deletes them if autoDelete() is TRUE. See also remove(). uint QPtrQueue::count () const Returns the number of items in the queue. See also isEmpty(). type * QPtrQueue::current () const Returns a pointer to the head item in the queue. The queue is not changed. Returns 0 if the queue is empty. See also dequeue() and isEmpty(). type * QPtrQueue::dequeue () Takes the head item from the queue and returns a pointer to it. Returns 0 if the queue is empty. See also enqueue() and count(). void QPtrQueue::enqueue ( const type * d ) Adds item d to the tail of the queue. See also count() and dequeue(). type * QPtrQueue::head () const Returns a pointer to the head item in the queue. The queue is not changed. Returns 0 if the queue is empty. See also dequeue() and isEmpty(). bool QPtrQueue::isEmpty () const Returns TRUE if the queue is empty; otherwise returns FALSE. See also count(), dequeue(), and head(). QPtrQueue::operator type * () const Returns a pointer to the head item in the queue. The queue is not changed. Returns 0 if the queue is empty. See also dequeue() and isEmpty(). QPtrQueue<;type> & QPtrQueue::operator= ( const QPtrQueue<type> & queue ) Assigns queue to this queue and returns a reference to this queue. This queue is first cleared and then each item in queue is enqueued to this queue. Only the pointers are copied. Warning: The autoDelete() flag is not modified. If it it TRUE for both queue and this queue, deleting the two lists will cause double- deletion of the items. QDataStream &; QPtrQueue::read ( QDataStream & s, QPtrCollection::Item & item ) [virtual protected] Reads a queue item, item, from the stream s and returns a reference to the stream. The default implementation sets item to 0. See also write(). bool QPtrQueue::remove () Removes the head item from the queue, and returns TRUE if there was an item, i.e. the queue wasn't empty; otherwise returns FALSE. The item is deleted if autoDelete() is TRUE. See also head(), isEmpty(), and dequeue(). void QPtrQueue::setAutoDelete ( bool enable ) Sets the queue to auto-delete its contents if enable is TRUE and not to delete them if enable is FALSE. If auto-deleting is turned on, all the items in a queue are deleted when the queue itself is deleted. This can be quite convenient if the queue has the only pointer to the items. The default setting is FALSE, for safety. If you turn it on, be careful about copying the queue: you might find yourself with two queues deleting the same items. See also autoDelete(). QDataStream &; QPtrQueue::write ( QDataStream & s, QPtrCollection::Item item ) const [virtual protected] Writes a queue item, item, to the stream s and returns a reference to the stream. The default implementation does nothing. See also read(). SEE ALSO
http://doc.trolltech.com/qptrqueue.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qptrqueue.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QPtrQueue(3qt)
All times are GMT -4. The time now is 08:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy