Hi friends, :)
In a shell script i found the following if condition.
echo -n "Which version of $1 do you want to restore ('0' to quit)? : "
read desired
if ${desired:=1} -ge $index ] ; then
echo "$0: Restore canceled by user: index value too big." >&2
exit 1
fi
Can... (1 Reply)
i have a paramter data_date in which i am passing a string value.i want to find out another paramter file_date from this.the logic is given below
if day of data_date = sunday or monday
then
file_date=data_date-1
else
file_date=data_date-2
i am passing data_date as 20061027.
how can i... (3 Replies)
Hi,
I am trying to execute this command, but is it not working, says "`;' unexpected"
eval $lgrep $SAM_CMD ; if ; then ; echo "No Error" ; fi
What i want is, return the command output, if it is non zero, say "No Error".
Thanks, John. (21 Replies)
Hi
I have to evaluate multiple conditions with an 'or'.
Here is an example:
if
when i use the above i get a error message
'
Please help me to know if i am missing something in the syntax.
how do i achieve multiple "or" in the same if condition.
Thanks. (11 Replies)
Executed the following if conditions .. and got different results .
only (( )) gave correct o/p with all scenarios .
Can anybody please let me know what is the difference between and ] and ((condition)) when used with if condition.
And why each condition gave different result.
1.... (2 Replies)
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
HI
My doubt may be basic one but I need to get it clarified..
When i use "if" condition that checks for many AND, OR logical conditions
like
if ]; then
return 0
fi
Even the if condition fails it returns as zero.. Any clue..
But if i add else condition like
if ]; ... (2 Replies)
o/p of my command is given below
My requirement is
if Pnumber is 0 then
stabilization.Build.2013
else
stabilization.PBuild.2013.3 (11 Replies)
Discussion started by: nikhil jain
11 Replies
LEARN ABOUT DEBIAN
mlm
FBB::mlm(3bobcat) OFoldStream manipulator FBB::mlm(3bobcat)NAME
FBB::mlm - Manipulator modifying left margins of OFoldStream objects
SYNOPSIS
#include <bobcat/ofoldstream> or
#include <bobcat/ofoldstreambuf>
Linking option: -lbobcat
DESCRIPTION
The mlm class implements a manipulator that can be inserted into OFoldStream objects to modify the stream's left margin by a requested
amount. The request cannot result in a negative left margin value. If a negative left margin would be the arithmetic result of the request
then left margin 0 will silently be used.
Depending on the tab-setting of the OFoldStream the inserted value represents the number of blank space characters or the number of
tab-characters that will be added to the left margin.
The request will be processed at the next newline character or std::flush or std::endl manipulator that is inserted into the stream. If a
line is still empty once an mlm object and a flush manipulator are inserted into the stream then the new left margin will be effective at
the next word inserted into that line (cf., the example section below)
A bad_cast exception is thrown when the manipulator is inserted into an ostream that is not using a OFoldStreambuf buffer.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM -
CONSTRUCTOR
o mlm(int addValue):
The standard copy constructor is available.
MEMBER FUNCTIONS
There are no public or protected member functions in this class.
EXAMPLE
#include <iostream>
#include <bobcat/ofoldstream>
using namespace std;
using namespace FBB;
int main()
{
OFoldStream out(cout, 0, 80);
out << "hello world (left margin is 0)" << mlm(4) << "
"
"this uses a 4 character wide left margin
" <<
mlm(-10) << flush <<
"left margin -6 changed to 0, active on this line
";
return 0;
}
FILES
bobcat/mlm - defines the class interface
SEE ALSO bobcat(7), manipulators(3bobcat), lm(3bobcat), ofoldstream(3bobcat)BUGS
None Reported.
DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature;
o bobcat_3.01.00-x.tar.gz: source archive;
o bobcat_3.01.00-x_i386.changes: change log;
o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries;
o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages;
o http://sourceforge.net/projects/bobcat: public archive location;
BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.
COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL).
AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl).
libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::mlm(3bobcat)