Sponsored Content
Top Forums Shell Programming and Scripting difference between double inverted coma and single inverted comma Post 302107229 by jim mcnamara on Thursday 15th of February 2007 10:03:27 AM
Old 02-15-2007
Code:
'  is a tic or tic-mark or single quote
" is a double quote

quotes affect how the shell treats a variable.
Code:
if [ -f $filename ] translates $filename - if it has spaces the shell "thinks" $filename
         is really separate values  with no spaces
if [ -f "$filename" ] translates $filename - if it has spaces the shell "thinks" $filename
         is realy one single value, spaces included
if [ -f '$filename' ] does not translate filename - the shell takes the $ literally, not
         as a shell token meaning return the value of a variable

 

8 More Discussions You Might Find Interesting

1. Red Hat

Sometimes my xterm colors get inverted

I don't know exactly when or why, maybe running less or some command, my white text on a black background gets inverted and all the text looks like it is "selected", it is white background with black text. it is very annoying. I found this solution.;. export TERM=vt100 vi This... (0 Replies)
Discussion started by: srhadden
0 Replies

2. Shell Programming and Scripting

Insert Inverted Commas Around Numeric Values

Hi, I am trying to insert Inverted Commas around all the numeric values within a comma seperated string / variable. 1111,2222,3333,4444 I would like it to be: '1111','2222','3333','4444' Note - This string could have a differing amount of numeric values each time the variable is... (4 Replies)
Discussion started by: RichZR
4 Replies

3. Shell Programming and Scripting

Searching inverted lines

Hi fellas, I have a file like this: A_B B_D C_D D_B E_F G_H B_A F_E In other words, I have member1_member2 and member2_member1 in the same file. In the exemple aforementioned I have A_B and B_A, B_D and D_B, E_F and F_E. So, I would like to know a sript that print the lines B_A, D_B... (3 Replies)
Discussion started by: valente
3 Replies

4. Shell Programming and Scripting

Need Help - comma inside double quote in comma separated csv,

Hello there, I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process. Input in the csv file is , 1,234,"abc,12,gh","GH234TY",34 I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

5. Shell Programming and Scripting

Inverted commas replace

Hi, My input file is like this chr1 + "NM_1234" chr1 - "NM_1234" If I want my third column to contain both the first and second column values, how do I do it? I know how to do it by including the column numbers, but I want the values before the inverted commas. So, my output would... (5 Replies)
Discussion started by: jacobs.smith
5 Replies

6. Shell Programming and Scripting

Remove inverted duplicates from a mapping database

My excuses for a Title which does not really describe what I need. My OS is Windows Vista/Windows7 I have a large database of homographs with the following structure: name=name variant i.e. a variant of a name is provided on a line separated by a =. An example will make this clear ... (1 Reply)
Discussion started by: gimley
1 Replies

7. Shell Programming and Scripting

awk to parse comma separated field and removing comma in between number and double quotes

Hi Experts, Please support I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6. ... (3 Replies)
Discussion started by: as7951
3 Replies

8. Shell Programming and Scripting

The Shell lost the inverted comma in a nested ssh command

Hi, i want use this Comand for my psql request sh ssh -o StrictHostKeyChecking=no rootatemailaddress.de sudo psql -U postgres -c "select pg_terminate_backend(pid) from pg_stat_activity where datnam=\'$DB\';"'" but the shell lost the inverted comma for datnam=\'$DB\'. The request deliver... (2 Replies)
Discussion started by: peterpane007
2 Replies
QwtDoubleInterval(3)						 Qwt User's Guide					      QwtDoubleInterval(3)

NAME
QwtDoubleInterval - A class representing an interval. SYNOPSIS
#include <qwt_double_interval.h> Public Types enum BorderMode { IncludeBorders = 0, ExcludeMinimum = 1, ExcludeMaximum = 2, ExcludeBorders = ExcludeMinimum | ExcludeMaximum } Public Member Functions int borderFlags () const bool contains (double value) const QwtDoubleInterval extend (double value) const QwtDoubleInterval intersect (const QwtDoubleInterval &) const bool intersects (const QwtDoubleInterval &) const void invalidate () QwtDoubleInterval inverted () const bool isNull () const bool isValid () const QwtDoubleInterval limited (double minValue, double maxValue) const double maxValue () const double minValue () const QwtDoubleInterval normalized () const int operator!= (const QwtDoubleInterval &) const QwtDoubleInterval operator& (const QwtDoubleInterval &) const QwtDoubleInterval & operator&= (const QwtDoubleInterval &) int operator== (const QwtDoubleInterval &) const QwtDoubleInterval operator| (double) const QwtDoubleInterval operator| (const QwtDoubleInterval &) const QwtDoubleInterval & operator|= (double) QwtDoubleInterval & operator|= (const QwtDoubleInterval &) QwtDoubleInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) QwtDoubleInterval () void setBorderFlags (int) void setInterval (double minValue, double maxValue, int borderFlags=IncludeBorders) void setMaxValue (double) void setMinValue (double) QwtDoubleInterval symmetrize (double value) const QwtDoubleInterval unite (const QwtDoubleInterval &) const double width () const Detailed Description A class representing an interval. The interval is represented by 2 doubles, the lower and the upper limit. Member Enumeration Documentation enum QwtDoubleInterval::BorderMode Flag indicating if a border is included/excluded from an interval o IncludeBorders min/max values are inside the interval o ExcludeMinimum min value is not included in the interval o ExcludeMaximum max value is not included in the interval o ExcludeBorders min/max values are not included in the interval See also: setBorderMode(), testBorderMode() Constructor &; Destructor Documentation QwtDoubleInterval::QwtDoubleInterval () [inline] Default Constructor. Creates an invalid interval [0.0, -1.0] See also: setInterval(), isValid() QwtDoubleInterval::QwtDoubleInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Constructor Build an interval with from min/max values Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders Member Function Documentation int QwtDoubleInterval::borderFlags () const [inline] Returns: Border flags See also: setBorderFlags() bool QwtDoubleInterval::contains (doublevalue) const Test if a value is inside an interval Parameters: value Value Returns: true, if value >= minValue() && value <= maxValue() QwtDoubleInterval QwtDoubleInterval::extend (doublevalue) const Extend the interval If value is below minValue, value becomes the lower limit. If value is above maxValue, value becomes the upper limit. extend has no effect for invalid intervals Parameters: value Value See also: isValid() QwtDoubleInterval QwtDoubleInterval::intersect (const QwtDoubleInterval &other) const Intersect 2 intervals. bool QwtDoubleInterval::intersects (const QwtDoubleInterval &other) const Test if two intervals overlap void QwtDoubleInterval::invalidate () [inline] Invalidate the interval The limits are set to interval [0.0, -1.0] See also: isValid() QwtDoubleInterval QwtDoubleInterval::inverted () const Invert the limits of the interval Returns: Inverted interval See also: normalized() bool QwtDoubleInterval::isNull () const [inline] Returns: true, if isValid() && (minValue() >= maxValue()) bool QwtDoubleInterval::isValid () const [inline] A interval is valid when minValue() <= maxValue(). In case of QwtDoubleInterval::ExcludeBorders it is true when minValue() < maxValue() QwtDoubleInterval QwtDoubleInterval::limited (doublelowerBound, doubleupperBound) const Limit the interval, keeping the border modes Parameters: lowerBound Lower limit upperBound Upper limit Returns: Limited interval double QwtDoubleInterval::maxValue () const [inline] Returns: Upper limit of the interval double QwtDoubleInterval::minValue () const [inline] Returns: Lower limit of the interval QwtDoubleInterval QwtDoubleInterval::normalized () const Normalize the limits of the interval. If maxValue() < minValue() the limits will be inverted. Returns: Normalized interval See also: isValid(), inverted() int QwtDoubleInterval::operator!= (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator& (const QwtDoubleInterval &interval) const [inline] Intersection of two intervals See also: intersect() QwtDoubleInterval & QwtDoubleInterval::operator&= (const QwtDoubleInterval &interval) Intersects this interval with the given interval. int QwtDoubleInterval::operator== (const QwtDoubleInterval &other) const [inline] Compare two intervals. QwtDoubleInterval QwtDoubleInterval::operator| (const QwtDoubleInterval &interval) const [inline] Union of two intervals See also: unite() QwtDoubleInterval QwtDoubleInterval::operator| (doublevalue) const [inline] Extend an interval See also: extend() QwtDoubleInterval & QwtDoubleInterval::operator|= (const QwtDoubleInterval &interval) Unites this interval with the given interval. void QwtDoubleInterval::setBorderFlags (intborderFlags) [inline] Change the border flags Parameters: borderFlags Or'd BorderMode flags See also: borderFlags() void QwtDoubleInterval::setInterval (doubleminValue, doublemaxValue, intborderFlags = IncludeBorders) [inline] Assign the limits of the interval Parameters: minValue Minimum value maxValue Maximum value borderFlags Include/Exclude borders void QwtDoubleInterval::setMaxValue (doublemaxValue) [inline] Assign the upper limit of the interval Parameters: maxValue Maximum value void QwtDoubleInterval::setMinValue (doubleminValue) [inline] Assign the lower limit of the interval Parameters: minValue Minimum value QwtDoubleInterval QwtDoubleInterval::symmetrize (doublevalue) const Adjust the limit that is closer to value, so that value becomes the center of the interval. Parameters: value Center Returns: Interval with value as center QwtDoubleInterval QwtDoubleInterval::unite (const QwtDoubleInterval &other) const Unite 2 intervals. double QwtDoubleInterval::width () const [inline] Return the width of an interval The width of invalid intervals is 0.0, otherwise the result is maxValue() - minValue(). See also: isValid() Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtDoubleInterval(3)
All times are GMT -4. The time now is 10:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy