Sponsored Content
Full Discussion: SED removing CR/LF
Top Forums Shell Programming and Scripting SED removing CR/LF Post 302469167 by Corona688 on Thursday 4th of November 2010 11:11:48 PM
Old 11-05-2010
It's the shell that's doing it, not sed. Put quotes around it, i.e. template="$(stuff)" instead of template=$(stuff)

Instead of storing it to a variable and printing it back, why not let sed print to stdout instead? Otherwise you may at some inconvenient point discover the limitations on lengths of a shell variable on your system.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed: removing backticks from certain lines

Hi, I would like to change some lines in my mysql-dump, because there a syntax problems with some version of mysql. I 'd like to change USE ´someDatabase´; to USE someDatabase; (without backticks) using the sed command in the shell Thanks & best regards Bernd (5 Replies)
Discussion started by: bjb
5 Replies

2. Shell Programming and Scripting

Removing '." character using SED

HI All, Have some files which contains some string like, "create .<table1> as" "insert into .<table2> values", i want to replace ".<table1>" with only "<table1>", i.e removing '.' character in ksh, i have written below code but it is not removing the dot character, any help? for name... (2 Replies)
Discussion started by: arvindcgi
2 Replies

3. Shell Programming and Scripting

Removing lines with sed

Here is some code output that I have: architecture ppc cputype CPU_TYPE_POWERPC cpusubtype CPU_SUBTYPE_POWERPC_ALL offset 4096 size 184464 align 2^12 (4096) architecture ppc64 cputype CPU_TYPE_POWERPC64 cpusubtype CPU_SUBTYPE_POWERPC_ALL offset 192512 ... (5 Replies)
Discussion started by: pcwiz
5 Replies

4. Shell Programming and Scripting

Removing a character using sed

Hi, I have a file with the text below. How do i remove the character "%" from the text file using sed ? Can anybody help ? 0% 68% 72% 0% 54% 33% 75% 24% 6% 59% 77% 77% 33% (6 Replies)
Discussion started by: Raynon
6 Replies

5. Shell Programming and Scripting

Removing domain suffix with SED

Hi Experts, I have a syslog file from 1000's of different hosts which I want to adjust by removing the domain suffix from the hosts. My previous attempts haven't managed to match all the different lenghts of the subdomains which are being logged. Could somebody suggest which sed syntax... (6 Replies)
Discussion started by: krypton
6 Replies

6. UNIX for Dummies Questions & Answers

Removing end of line using SED

Hello Friends, How can I remove the last two values of this line using sed John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900 The result should look like this: John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies

7. Shell Programming and Scripting

sed removing values

Is there an easy way in sed to remove a character and values after that character? ex: blackout_10-11-2011(NODE_LEVEL) I want to remove '(' and everything after. so I will only have. blackout_10-11-2011 I can use a cut command to do this but interested in seeing how its done... (1 Reply)
Discussion started by: BeefStu
1 Replies

8. Shell Programming and Scripting

removing html format with sed

Hello i am trying to remove the html format from the file using sed. for example remove <p> </p> i tried to do this : sed -e 's/<*>//g' test > test.t but still i have some html format . please help if you have any suggestions lets say this is the html file 1... (11 Replies)
Discussion started by: koricha
11 Replies

9. Shell Programming and Scripting

Removing quotes in sed

I have a file and I want to remove quotes from the word " ` " through sed command but unable to remove I am using below command sed s/"`XYZ`"/"ZXY"/g file1.txt > file2.txt But this is not working. How can we remove "`" through sed command (2 Replies)
Discussion started by: kaushik02018
2 Replies

10. UNIX for Beginners Questions & Answers

Removing unwanted symbols with sed

I would like produce blue, green, red, yellowfrom"blue:,*green:,*red:,*yellowI can remove the colon with echo "blue:,*green:,*red:,*yellow" | sed 's/://g'which givesblue,*green,*red,*yellowbut when I try echo "blue:,*green:,*red:,*yellow" | sed 's/://g'; 's/*//g'I get bash: s/*//g: No such... (9 Replies)
Discussion started by: Xubuntu56
9 Replies
QwtScaleWidget(3)						 Qwt User's Guide						 QwtScaleWidget(3)

NAME
QwtScaleWidget - A Widget which contains a scale. SYNOPSIS
#include <qwt_scale_widget.h> Signals void scaleDivChanged () Public Member Functions QwtScaleDraw::Alignment alignment () const QwtDoubleInterval colorBarInterval () const QRect colorBarRect (const QRect &) const int colorBarWidth () const const QwtColorMap & colorMap () const int dimForLength (int length, const QFont &scaleFont) const void drawColorBar (QPainter *painter, const QRect &rect) const void drawTitle (QPainter *painter, QwtScaleDraw::Alignment, const QRect &rect) const int endBorderDist () const void getBorderDistHint (int &start, int &end) const void getMinBorderDist (int &start, int &end) const bool isColorBarEnabled () const int margin () const virtual QSize minimumSizeHint () const int penWidth () const QwtScaleWidget (QWidget *parent=NULL) QwtScaleWidget (QwtScaleDraw::Alignment, QWidget *parent=NULL) const QwtScaleDraw * scaleDraw () const QwtScaleDraw * scaleDraw () void setAlignment (QwtScaleDraw::Alignment) void setBorderDist (int start, int end) void setColorBarEnabled (bool) void setColorBarWidth (int) void setColorMap (const QwtDoubleInterval &, const QwtColorMap &) void setLabelAlignment (Qt::Alignment) void setLabelRotation (double rotation) void setMargin (int) void setMinBorderDist (int start, int end) void setPenWidth (int) void setScaleDiv (QwtScaleTransformation *, const QwtScaleDiv &sd) void setScaleDraw (QwtScaleDraw *) void setSpacing (int td) void setTitle (const QString &title) void setTitle (const QwtText &title) virtual QSize sizeHint () const int spacing () const int startBorderDist () const QwtText title () const int titleHeightForWidth (int width) const virtual ~QwtScaleWidget () Protected Member Functions void draw (QPainter *p) const void layoutScale (bool update=true) virtual void paintEvent (QPaintEvent *e) virtual void resizeEvent (QResizeEvent *e) void scaleChange () Detailed Description A Widget which contains a scale. This Widget can be used to decorate composite widgets with a scale. Constructor &; Destructor Documentation QwtScaleWidget::QwtScaleWidget (QWidget *parent = NULL) [explicit] Create a scale with the position QwtScaleWidget::Left. Parameters: parent Parent widget QwtScaleWidget::QwtScaleWidget (QwtScaleDraw::Alignmentalign, QWidget *parent = NULL) [explicit] Constructor. Parameters: align Alignment. parent Parent widget QwtScaleWidget::~QwtScaleWidget () [virtual] Destructor. Member Function Documentation QwtScaleDraw::Alignment QwtScaleWidget::alignment () const Returns: position See also: setPosition() int QwtScaleWidget::dimForLength (intlength, const QFont &scaleFont) const Find the minimum dimension for a given length. dim is the height, length the width seen in direction of the title. Parameters: length width for horizontal, height for vertical scales scaleFont Font of the scale Returns: height for horizontal, width for vertical scales void QwtScaleWidget::draw (QPainter *p) const [protected] draw the scale void QwtScaleWidget::drawTitle (QPainter *painter, QwtScaleDraw::Alignmentalign, const QRect &rect) const Rotate and paint a title according to its position into a given rectangle. Parameters: painter Painter align Alignment rect Bounding rectangle int QwtScaleWidget::endBorderDist () const Returns: end border distance See also: setBorderDist() void QwtScaleWidget::getBorderDistHint (int &start, int &end) const Calculate a hint for the border distances. This member function calculates the distance of the scale's endpoints from the widget borders which is required for the mark labels to fit into the widget. The maximum of this distance an the minimum border distance is returned. Warning: o The minimum border distance depends on the font. See also: setMinBorderDist(), getMinBorderDist(), setBorderDist() void QwtScaleWidget::getMinBorderDist (int &start, int &end) const Get the minimum value for the distances of the scale's endpoints from the widget borders. See also: setMinBorderDist(), getBorderDistHint() void QwtScaleWidget::layoutScale (boolupdate = true) [protected] Recalculate the scale's geometry and layout based on. int QwtScaleWidget::margin () const Returns: margin See also: setMargin() QSize QwtScaleWidget::minimumSizeHint () const [virtual] Returns: a minimum size hint void QwtScaleWidget::paintEvent (QPaintEvent *e) [protected, virtual] paintEvent int QwtScaleWidget::penWidth () const Returns: Scale pen width See also: setPenWidth() void QwtScaleWidget::resizeEvent (QResizeEvent *e) [protected, virtual] resizeEvent void QwtScaleWidget::scaleChange () [protected] Notify a change of the scale. This virtual function can be overloaded by derived classes. The default implementation updates the geometry and repaints the widget. void QwtScaleWidget::scaleDivChanged () [signal] Signal emitted, whenever the scale divison changes. const QwtScaleDraw * QwtScaleWidget::scaleDraw () const scaleDraw of this scale See also: setScaleDraw(), QwtScaleDraw::setScaleDraw() QwtScaleDraw * QwtScaleWidget::scaleDraw () scaleDraw of this scale See also: QwtScaleDraw::setScaleDraw() void QwtScaleWidget::setAlignment (QwtScaleDraw::Alignmentalignment) Change the alignment Parameters: alignment New alignment See also: alignment() void QwtScaleWidget::setBorderDist (intdist1, intdist2) Specify distances of the scale's endpoints from the widget's borders. The actual borders will never be less than minimum border distance. Parameters: dist1 Left or top Distance dist2 Right or bottom distance See also: borderDist() void QwtScaleWidget::setLabelAlignment (Qt::Alignmentalignment) Change the alignment for the labels. See also: QwtScaleDraw::setLabelAlignment(), setLabelRotation() void QwtScaleWidget::setLabelRotation (doublerotation) Change the rotation for the labels. See QwtScaleDraw::setLabelRotation(). Parameters: rotation Rotation See also: QwtScaleDraw::setLabelRotation(), setLabelFlags() void QwtScaleWidget::setMargin (intmargin) Specify the margin to the colorBar/base line. Parameters: margin Margin See also: margin() void QwtScaleWidget::setMinBorderDist (intstart, intend) Set a minimum value for the distances of the scale's endpoints from the widget borders. This is useful to avoid that the scales are 'jumping', when the tick labels or their positions change often. Parameters: start Minimum for the start border end Minimum for the end border See also: getMinBorderDist(), getBorderDistHint() void QwtScaleWidget::setPenWidth (intwidth) Specify the width of the scale pen. Parameters: width Pen width See also: penWidth() void QwtScaleWidget::setScaleDiv (QwtScaleTransformation *transformation, const QwtScaleDiv &scaleDiv) Assign a scale division. The scale division determines where to set the tick marks. Parameters: transformation Transformation, needed to translate between scale and pixal values scaleDiv Scale Division See also: For more information about scale divisions, see QwtScaleDiv. void QwtScaleWidget::setScaleDraw (QwtScaleDraw *sd) Set a scale draw sd has to be created with new and will be deleted in ~QwtScaleWidget() or the next call of setScaleDraw(). Parameters: sd ScaleDraw object See also: scaleDraw() void QwtScaleWidget::setSpacing (intspacing) Specify the distance between color bar, scale and title. Parameters: spacing Spacing See also: spacing() void QwtScaleWidget::setTitle (const QString &title) Give title new text contents Parameters: title New title See also: title(), setTitle(const QwtText &); void QwtScaleWidget::setTitle (const QwtText &title) Give title new text contents Parameters: title New title See also: title() Warning: The title flags are interpreted in direction of the label, AlignTop, AlignBottom can't be set as the title will always be aligned to the scale. QSize QwtScaleWidget::sizeHint () const [virtual] Returns: a size hint int QwtScaleWidget::spacing () const Returns: distance between scale and title See also: setMargin() int QwtScaleWidget::startBorderDist () const Returns: start border distance See also: setBorderDist() QwtText QwtScaleWidget::title () const Returns: title See also: setTitle() int QwtScaleWidget::titleHeightForWidth (intwidth) const Find the height of the title for a given width. Parameters: width Width Returns: height Height Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtScaleWidget(3)
All times are GMT -4. The time now is 09:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy