I'm not sure if you are saying you are already using this, and would like to avoid it, but then I don't really see what would be much simpler than this.
If the replacement values should not be hardcoded, you need to adjust the quoting; single quotes prevent variable expansion, but you can mix single and double quotes freely to protect the parts which need protection and still get variable interpolation where you want it.
Is there a way that I can make the following work with using variables?
perl -pi -e 's#blah#hrm#ig' replacetext
but like this
var=blah
perl -pi -e 's#$var#hrm#ig' replacetext (3 Replies)
Dear friends please help,
I have a large data file with few hundred lines. A small example is shown below:
datafile is a file with few hundred lines with the third column has many different character stings:
test 100 abc
test 134 bcd
test 356 cdf
test 831 dfg
test 720 fgh
I need to... (6 Replies)
here is my prob ..
i have a very large text files and i need to locate specific lines, copy them and then replace a single word in the replaced text
example
find all lines that contain '/etc', copy the line immediately below (not at the end of the file) and then replace '/etc' with '/root'... (1 Reply)
Hi,
My input file
form 1
fill 2
fill 3
form 4
fill 5
form 6
fill 7
form 8
Now i need to substiute according to the fill.
form followed by single fill need to be replced with category 1
form with above and below fill need to be repalced with category 2 (5 Replies)
i am editing a big log file with the following pattern:
Date: xxxx Updated: name
Some log file text here
Date: eee Updated: ny
Some log file text here
Basically i want to remove all the text in a line before the "Updated" pattern. I sill want to print the other... (4 Replies)
Hi.
I would like to have experts help on below action.
I have text files in which page nubmers exists in form like
PAGE : 1
PAGE : 2
PAGE : 3 and so on there is other text too. I would like to know is it possible to check the last occurance of Page... (6 Replies)
Dear All,
I do not have any knowledge of scripting. I want to replace specific lines of a text file with a specific text. Like I have one file which is "original file" and one file "changes file" which has list of lines which I want to replace in original file with a specific string. I want the... (5 Replies)
I have two files
a.txt
b.txt
I want to find a line in a.txt and replace by another line from b.txt
a.txt
asfsdfsfsfdfsf
asfwererfgdgf
wrerwetretfdg
b.txt
werdfgdfgf
werergfdgd
sfdfgfgfgfgg
i want to replace the 1st line of a.txt by 1st line of b.txt
i want out put as (5 Replies)
Have multiple files with the same format and certain text is the same. Have specific text to search for and then need to replace the next line. Can search on the text DEVICE and multiple lines will be found. The line after each DEVICE line has {. Want to replace the line { with {-someadditiontext.... (2 Replies)
Discussion started by: bigdaddywags
2 Replies
LEARN ABOUT CENTOS
qlistboxtext
QListBoxText(3qt)QListBoxText(3qt)NAME
QListBoxText - List box items that display text
SYNOPSIS
#include <qlistbox.h>
Inherits QListBoxItem.
Public Members
QListBoxText ( QListBox * listbox, const QString & text = QString::null )
QListBoxText ( const QString & text = QString::null )
QListBoxText ( QListBox * listbox, const QString & text, QListBoxItem * after )
~QListBoxText ()
virtual int height ( const QListBox * lb ) const
virtual int width ( const QListBox * lb ) const
Protected Members
virtual void paint ( QPainter * painter )
DESCRIPTION
The QListBoxText class provides list box items that display text.
The text is drawn in the widget's current font. If you need several different fonts, you must implement your own subclass of QListBoxItem.
See also QListBox, QListBoxItem, and Advanced Widgets.
MEMBER FUNCTION DOCUMENTATION QListBoxText::QListBoxText ( QListBox * listbox, const QString & text = QString::null )
Constructs a list box item in list box listbox showing the text text.
QListBoxText::QListBoxText ( const QString & text = QString::null )
Constructs a list box item showing the text text.
QListBoxText::QListBoxText ( QListBox * listbox, const QString & text, QListBoxItem * after )
Constructs a list box item in list box listbox showing the text text. The item is inserted after the item after, or at the beginning if
after is 0.
QListBoxText::~QListBoxText ()
Destroys the item.
int QListBoxText::height ( const QListBox * lb ) const [virtual]
Returns the height of a line of text in list box lb.
See also paint() and width().
Reimplemented from QListBoxItem.
void QListBoxText::paint ( QPainter * painter ) [virtual protected]
Draws the text using painter.
Reimplemented from QListBoxItem.
int QListBoxText::width ( const QListBox * lb ) const [virtual]
Returns the width of this line in list box lb.
See also paint() and height().
Reimplemented from QListBoxItem.
SEE ALSO
http://doc.trolltech.com/qlistboxtext.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
(qlistboxtext.3qt) and the Qt version (3.3.8).
Trolltech AS 2 February 2007 QListBoxText(3qt)