Sponsored Content
Top Forums Shell Programming and Scripting How to concatenate texts in perl only? Post 302557372 by birei on Wednesday 21st of September 2011 04:08:21 AM
Old 09-21-2011
It works as you point out. One file each time as input.
Code:
$ perl concat.pl file1.txt

I don't know why you want all code in the same function. It 's an implementation decision. I did so to separate the differences in input files and facilitate possible future modifications. If it works, feel free to adapt it to your needs.

Regards,
Birei
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenate Logs - Perl Question

Hi All, I am fresh to perl and had been using shell scripting in my past experiences. In my part of perl program, i am trying to run a application command ccm stop, which should give some string output as the result. The output (error or sucess) has to be returned to an exisiting log file.... (4 Replies)
Discussion started by: ganga.dharan
4 Replies

2. Shell Programming and Scripting

Two Huge Texts and Combine Result to Third

hi, i want to examine two file and write some codes to a third file. note that seperators are TAB, not space. first file: 192.168.1.1 3 192.168.1.2 2 192.168.3.2 2 192.168.7.3 1 ... second file: 192.168.1.1 1 10.15.1.1 3 30 10.15.2.1 2 40 192.168.1.1 2 10.23.4.5... (3 Replies)
Discussion started by: gc_sw
3 Replies

3. Shell Programming and Scripting

extract texts using awk

Hello, I have two files: File1: a b c d File2: b c e I need 'e' as output.... Thanks.. ---------- Post updated at 12:16 PM ---------- Previous update was at 12:15 PM ---------- (1 Reply)
Discussion started by: shekhar2010us
1 Replies

4. Shell Programming and Scripting

Perl concatenate an array

Not a perl guru and need some help with a script I inherited. My perl script has a variable that is concatenated and works fine as is, but what I need is to remove a string in the output and input a files content. This is emailed as a html report and I can't get the file to output in the email... (5 Replies)
Discussion started by: numele
5 Replies

5. UNIX for Dummies Questions & Answers

perl filter unique and concatenate

Hi experts, I have some input like below, TEST A function W TEST A function X TEST B function Y TEST C function Z TEST C function ZY i would like to have below output, TEST A function W&X TEST B function Y TEST C function Z&ZY Please kindly help on this, i am cracking my head... (2 Replies)
Discussion started by: mingfatty
2 Replies

6. UNIX for Dummies Questions & Answers

Texts between 2 strings

Hi, I have a file with texts shown below, <2013 abc <2013 start request pdu dot1q end pdu response pdu dot1q end pdu am searching for the text "dot1q" , when it matches in the file , i need the contents between "<2013 start" and "end pdu". Can some one help on this ? ... (5 Replies)
Discussion started by: giri_luck
5 Replies

7. Shell Programming and Scripting

Concatenate small line with next line perl script

Hello to all, I'm new to perl, I have input file that contains the string below: 315350535ff450000014534130101ff4500ff45453779ff450ff45545f01ff45ff453245341ff4500000545000This string has as line separator "ff45". So, I want to print each line but the code below is not working. perl -pe '... (2 Replies)
Discussion started by: Ophiuchus
2 Replies

8. Post Here to Contact Site Administrators and Moderators

Can there be alt-texts to icons?

Can you add hover texts (alt-texts) to icons? It is not always obvious what each of them mean just by looking at them. Sometimes it is clear from the url it points to, but for accessibility reasons alone it would be good to have alt-texts as a standard. (1 Reply)
Discussion started by: figaro
1 Replies

9. Shell Programming and Scripting

Aligning Texts

is there any way to align my text so every column begins on the same line as the previous line? here's my command: printf "THEN ( ${SEARCHPATTB} = Hour = ${CALTOTB} ) %8s => %8s NOW ( ${SEARCHPATT} = Hour = ${CALTOT} ) %7s => %7s Reduced By: %7s -${RESULT}"\\n output i'm currently getting... (2 Replies)
Discussion started by: SkySmart
2 Replies
QwtTextEngine(3)						 Qwt User's Guide						  QwtTextEngine(3)

NAME
QwtTextEngine - Abstract base class for rendering text strings. SYNOPSIS
#include <qwt_text_engine.h> Inherited by QwtMathMLTextEngine, QwtPlainTextEngine, and QwtRichTextEngine. Public Member Functions virtual void draw (QPainter *painter, const QRect &rect, int flags, const QString &text) const =0 virtual int heightForWidth (const QFont &font, int flags, const QString &text, int width) const =0 virtual bool mightRender (const QString &text) const =0 virtual void textMargins (const QFont &font, const QString &text, int &left, int &right, int &top, int &bottom) const =0 virtual QSize textSize (const QFont &font, int flags, const QString &text) const =0 virtual ~QwtTextEngine () Protected Member Functions QwtTextEngine () Detailed Description Abstract base class for rendering text strings. A text engine is responsible for rendering texts for a specific text format. They are used by QwtText to render a text. QwtPlainTextEngine and QwtRichTextEngine are part of the Qwt library. QwtMathMLTextEngine can be found in Qwt MathML extension, that needs the MathML renderer of the Qt solutions package. Unfortunately it is only available with a commercial Qt license. See also: QwtText::setTextEngine() Constructor &; Destructor Documentation QwtTextEngine::~QwtTextEngine () [virtual] Destructor. QwtTextEngine::QwtTextEngine () [protected] Constructor. Member Function Documentation virtual void QwtTextEngine::draw (QPainter *painter, const QRect &rect, intflags, const QString &text) const [pure virtual] Draw the text in a clipping rectangle Parameters: painter Painter rect Clipping rectangle flags Bitwise OR of the flags like in for QPainter::drawText text Text to be rendered Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine. virtual int QwtTextEngine::heightForWidth (const QFont &font, intflags, const QString &text, intwidth) const [pure virtual] Find the height for a given width Parameters: font Font of the text flags Bitwise OR of the flags used like in QPainter::drawText text Text to be rendered width Width Returns: Calculated height Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine. virtual bool QwtTextEngine::mightRender (const QString &text) const [pure virtual] Test if a string can be rendered by this text engine Parameters: text Text to be tested Returns: true, if it can be rendered Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine. virtual void QwtTextEngine::textMargins (const QFont &font, const QString &text, int &left, int &right, int &top, int &bottom) const [pure virtual] Return margins around the texts The textSize might include margins around the text, like QFontMetrics::descent. In situations where texts need to be aligend in detail, knowing these margins might improve the layout calculations. Parameters: font Font of the text text Text to be rendered left Return value for the left margin right Return value for the right margin top Return value for the top margin bottom Return value for the bottom margin Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine. virtual QSize QwtTextEngine::textSize (const QFont &font, intflags, const QString &text) const [pure virtual] Returns the size, that is needed to render text Parameters: font Font of the text flags Bitwise OR of the flags like in for QPainter::drawText text Text to be rendered Returns: Caluclated size Implemented in QwtPlainTextEngine, QwtRichTextEngine, and QwtMathMLTextEngine. Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtTextEngine(3)
All times are GMT -4. The time now is 11:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy