Sponsored Content
Full Discussion: Problem parsing
Top Forums Shell Programming and Scripting Problem parsing Post 302902002 by protocomm on Saturday 17th of May 2014 07:21:52 AM
Old 05-17-2014
Quote:
Originally Posted by ygemici
hi,
maybe can try sed instead of awk Smilie

Code:
# sed 's|intermediation/|\n|g' input.text|sed -n 's|^\([^ ]*/[^ ]*/[^ ]*\)</pathurl>.*|\1|p;'
4D760F00085905C12202080046020125/Clip/C0001MXF
72A11400105905C12202080046020125/Clip/C0001MXF
C2EF1B00875805C20111216164346692/Clip/C0001MXF

regards
ygemici
Thanks for your answer, but the first command sed don't substitute "intermediation" with a newline
My shell is bash and my OS is OSX
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parsing problem with script

I'm trying to parse the variables out of a comma delimited expression, but i'm having trouble with script: num_var=1 while do a=`echo "a=7, b=8, c=9" | awk '{print $num_var}' | cut -d= -f2` b=`echo $a | cut -d, -f1` echo $b num_var=`expr $num_var + 1`... (5 Replies)
Discussion started by: mike@freddiemac
5 Replies

2. Shell Programming and Scripting

awk parsing problem

I need help with a problem that I have not been able to figure out. I have a file that is about 650K lines. Records are seperated by blank lines, fields seperated by new lines. I was trying to make a report that would add up 2 fields and associate them with a CP. example output would be... (11 Replies)
Discussion started by: timj123
11 Replies

3. Shell Programming and Scripting

Parsing problem

I need to separate out the contents in the string "xyz","1233","cm_asdfasdf" as xyz,1233,cm_asdfasdf Can anyone help me on this?? (1 Reply)
Discussion started by: Sushir03
1 Replies

4. Shell Programming and Scripting

Parsing problem

Hi, i need to parse a string which looks like this "xyz","1233","cm_asdfasdf" (2 Replies)
Discussion started by: Sushir03
2 Replies

5. Shell Programming and Scripting

Parsing problem

I need to parse a string which looks like "xyx","sdfsdf","asf_asdf" into var1="xyx" var2="sdfsdf" var3="asf_asdf" (3 Replies)
Discussion started by: Sushir03
3 Replies

6. Shell Programming and Scripting

Parsing textfile problem with cut

Hi, I have a textfile with several lines like this: text num: USER text (num) num num I need all these stuff. Problem is, how to get these stuff after ":". USER is a username and all chars are possible, even whitespace. So I cant use cut. Any ideas? (3 Replies)
Discussion started by: mcW
3 Replies

7. Shell Programming and Scripting

Parsing Problem

Hi all, I am having problems parsing the following file: cat mylist one,two,three four five,six My goal is to get each number on a seperate line. one two three four five six I tried this command: sed -e 's/\,/^M/g' mylist (11 Replies)
Discussion started by: rob11g
11 Replies

8. Shell Programming and Scripting

Parsing problem

Hello, I have a similar problem so I continue this thread. I have: my_script_to_format_nicely_bdf.sh | grep "RawData" |tr -s ' '|cut -d' ' -f 4|tr -d '%' So it supposed to return the percentage used of RawData FS: 80 (Want to use it in a alert script) However I also have a RawData2 FS so... (17 Replies)
Discussion started by: drbiloukos
17 Replies

9. Shell Programming and Scripting

Problem parsing args

Heya Tooltip: Parsing (getopts) for -u successfully sets mode=umnt, but case umnt is not executed, instead it either executes/show help or regular mount screen. I had copy pasted the structure of a getopts 'structure' from Man Page for getopts (posix Section 1) - The UNIX and Linux Forums... (1 Reply)
Discussion started by: sea
1 Replies

10. Shell Programming and Scripting

awk parsing problem

Hello fellow unix geeks, I am having a small dilemna trying to parse a log file I have. Below is a sample of what it will look like: MY_TOKEN1(group) TOKEN(other)|SSID1 MY_TOKEN2(group, group2)|SSID2 What I need to do is only keep the MY_TOKEN pieces and where there are multiple... (7 Replies)
Discussion started by: dagamier
7 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:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy