I am doing a basic script to check if services are disabled, and I was wondering how to change to colours for PASS and FAIL to green & red respectively.
#!/usr/bin/bash
clear
TELNET=`svcs -a | grep telnet | awk '{print $1}'`
if
then
RESULT=PASS
else
RESULT=FAIL
fi... (3 Replies)
I have a text wich looks like this:
clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hi!
I´m all new to Unix and scripts, I´ve tried to write a script for wc with text so the output looks better, can anyone help me please?
I want it like this example:
>textWc file #<scriptname> <file to to run script on>
File: file
Rows: 7
Words: 56
Signs: 1312
> (3 Replies)
I have a command which returns the below output. How can I write a script to extract mainhost and secondhost from this output and put it into an array? I may sometimes have more hosts like thirdhost. I am redirecting this output to a variable. So I guess there should be a awk or sed command to... (7 Replies)
I've a file in linux with following text:
;ip address hostname put-location alt-put-location tftpserver
192.168.1.1 r01-lab1-net /mnt/nas1/fgbu/ /opt/fgbu/devicebackup 192.168.1.254Now I want to read these values and assign them to particular variables... (6 Replies)
Hi Friends,
I have a very big text file, that has code for multiple functions. I have scan through the file and write each function in seperate file. All functions starts with
BEGIN DSFNC
Identifier "ABCDDataValidationfnc"
and ends with
END DSFNC
I need create a file(using identifier)... (2 Replies)
Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest.
DATE=20160120
I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
I am trying to use awk skip each line with a ## or # and check each line after for STB= and if that value in greater than or = to 0.8, then at the end of line the text "STRAND BIAS" is written in else "GOOD".
So in the file of 4 entries attached.
awk tried:
awk NR > "##"' "#" -F"STB="... (6 Replies)
In the bash below I am asking the user for a panel and reading that into bed. Then asking the user for a file and reading that into file1.Is the grep in bold the correct way to apply the selected panel to the file? I am getting a syntax error. Thank you :)
... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
qwttextlabel
QwtTextLabel(3) Qwt User's Guide QwtTextLabel(3)NAME
QwtTextLabel -
A Widget which displays a QwtText.
SYNOPSIS
#include <qwt_text_label.h>
Inherited by QwtLegendItem.
Public Slots
void clear ()
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
virtual void setText (const QwtText &)
Public Member Functions
virtual int heightForWidth (int) const
int indent () const
int margin () const
virtual QSize minimumSizeHint () const
QwtTextLabel (const QwtText &, QWidget *parent=NULL)
QwtTextLabel (QWidget *parent=NULL)
void setIndent (int)
void setMargin (int)
virtual QSize sizeHint () const
const QwtText & text () const
QRect textRect () const
virtual ~QwtTextLabel ()
Protected Member Functions
virtual void drawContents (QPainter *)
virtual void drawText (QPainter *, const QRect &)
virtual void paintEvent (QPaintEvent *e)
Detailed Description
A Widget which displays a QwtText.
Constructor & Destructor Documentation
QwtTextLabel::QwtTextLabel (QWidget *parent = NULL) [explicit] Constructs an empty label.
Parameters:
parent Parent widget
QwtTextLabel::QwtTextLabel (const QwtText &text, QWidget *parent = NULL) [explicit] Constructs a label that displays the text, text
Parameters:
parent Parent widget
text Text
QwtTextLabel::~QwtTextLabel () [virtual]
Destructor.
Member Function Documentation
void QwtTextLabel::clear () [slot]
Clear the text and all QwtText attributes.
void QwtTextLabel::drawContents (QPainter *painter) [protected, virtual]
Redraw the text and focus indicator.
void QwtTextLabel::drawText (QPainter *painter, const QRect &textRect) [protected, virtual]
Redraw the text.
Reimplemented in QwtLegendItem.
int QwtTextLabel::heightForWidth (intwidth) const [virtual] Returns the preferred height for this widget, given the width.
Parameters:
width Width
int QwtTextLabel::indent () const
Return label's text indent in pixels.
int QwtTextLabel::margin () const
Return label's text indent in pixels.
QSize QwtTextLabel::minimumSizeHint () const [virtual]
Return a minimum size hint.
void QwtTextLabel::paintEvent (QPaintEvent *event) [protected, virtual] Qt paint event
Parameters:
event Paint event
Reimplemented in QwtLegendItem.
void QwtTextLabel::setIndent (intindent) Set label's text indent in pixels
Parameters:
indent Indentation in pixels
void QwtTextLabel::setMargin (intmargin) Set label's margin in pixels
Parameters:
margin Margin in pixels
void QwtTextLabel::setText (const QwtText &text) [virtual, slot] Change the label's text
Parameters:
text New text
Reimplemented in QwtLegendItem.
void QwtTextLabel::setText (const QString &text, QwtText::TextFormattextFormat = QwtText::AutoText) [slot] Change the label's text, keeping all
other QwtText attributes
Parameters:
text New text
textFormat Format of text
See also:
QwtText
QSize QwtTextLabel::sizeHint () const [virtual]
Return label's margin in pixels.
Reimplemented in QwtLegendItem.
const QwtText & QwtTextLabel::text () const
Return the text.
QRect QwtTextLabel::textRect () const Calculate the rect for the text in widget coordinates
Returns:
Text rect
Author
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Version 5.2.2 Mon Aug 1 2011 QwtTextLabel(3)