Hi
I'm learning how to add in programm another option by command line.
For example in the "my_prog" i want to add a " -k " option and then write a number.
I mean:
my_prog -k 50
and the i should use the number 50.
I'm reading about getopt_long and optarg, and what i have done in the code... (0 Replies)
i'm confused what this means.
i was asked to design a menu or command line option driven script that reads out of a DB and displays info such as
read_data.pl -u <user> -e <event>
which would print commands run by <user>with the <event> in the db.
any suggestions? i've been using... (2 Replies)
Hi Folks,
I am new to ksh, i have informatica parameter file that i need to update everyday with shell script. i need your help updating this file with new parameters.
sample data
$$TABLE1_DATE=04-27-2011
$$TABLE2_DATE=04-23-2011
$$TABLE3_DATE=03-19-2011
.......Highligned... (4 Replies)
Hi,
I am creating a program with the C language that simulates the WC command in Unix. My program needs to count lines, bytes and words. I have not added the code to count bytes and words yet. I am having trouble understanding what the file option/flag '-' does. I can not visualize how it moves... (1 Reply)
I am trying to write a script that will allow me to recursively look at my directories, and output all filenames to a txt document. I am almost finished, however I am hitting one last snag. Here is my script so far:
find . | grep .jpg | awk -F"/" '{print $NF}' > output.txtThis will give me an... (7 Replies)
Hi,
I have a file like :
I want to remove last string in last line (here total string is "05550"~). And last line end with ~ character.
Output should be :
Please help me
Thanks in advance (3 Replies)
I have a C++ program. I read command line arguments, but if the value is not supplied, I default or make a calculation. Let's say I set it to a default value.
I can code this in several ways. Here I show three ways. What would be the best way for maintaining this code? The program will get very... (2 Replies)
Hi all!
I have a data set in this tab separated format : Label, Value1, Value2
An instance is "data.txt" :
0 1 1
-1 2 3
0 2 2
I would like to parse this data set and generate two files, one that has only data with the label 0 and the other with label -1, so my outputs should be, for... (1 Reply)
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
LEARN ABOUT DEBIAN
shevek_ristring
shevek::ristring(3) Library Functions Manual shevek::ristring(3)NAME
shevek::ristring -
shevek::ristring is identical to shevek::istring, but it uses std::string instead of Glib::ustring.
SYNOPSIS
#include <iostring.hh>
Public Member Functions
ristring ()
Create a new istring with no data.
ristring (std::string const &str)
Create a new istring with data.
void init (std::string const &str)
Set new data to an existing istring.
void push ()
Push the current position to the stack so it can be restored later.
int pop (bool keep=false)
Pop the last pushed position from the stack.
void reset ()
Set the current position to 0, but don't change the stack.
std::string rest () const
Get remaining string.
void skip (std::string::size_type p)
Skip some characters.
bool operator() (std::string const &format)
Read a constant string from the input.
template<typename T1 > bool operator() (std::string const &format, T1 &arg1)
Read a string containing one argument from the input.
template<typename T1 , typename T2 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2)
Read a string containing two arguments from the input.
template<typename T1 , typename T2 , typename T3 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3)
Read a string containing three arguments from the input.
template<typename T1 , typename T2 , typename T3 , typename T4 > bool operator() (std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3,
T4 &arg4)
Read a string containing four arguments from the input.
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > bool operator() (std::string const &format, T1 &arg1, T2
&arg2, T3 &arg3, T4 &arg4, T5 &arg5)
Read a string containing five arguments from the input.
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > bool operator() (std::string const &format, T1
&arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6)
Read a string containing six arguments from the input.
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > bool operator() (std::string
const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7)
Read a string containing seven arguments from the input.
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > bool operator()
(std::string const &format, T1 &arg1, T2 &arg2, T3 &arg3, T4 &arg4, T5 &arg5, T6 &arg6, T7 &arg7, T8 &arg8)
Read a string containing eight arguments from the input.
Static Public Member Functions
template<typename T > static T direct (std::string const &data, std::string const &format, T def=T())
Read a variable from given data and return it.
Detailed Description
shevek::ristring is identical to shevek::istring, but it uses std::string instead of Glib::ustring.
Member Function Documentation
template<typename T > static T shevek::ristring::direct (std::string const &data, std::string const &format, Tdef = T ()) [inline, static]
Read a variable from given data and return it. This allows using a shevek::istring in an expression without the need to create a new
variable for it. If the input doesn't match the format, def is returned.
int shevek::ristring::pop (boolkeep = false)
Pop the last pushed position from the stack. If keep is true or not given, the current position is restored to the last position. If it is
false, the current position is not changed.
Author
Generated automatically by Doxygen for libshevek from the source code.
libshevek Fri May 11 2012 shevek::ristring(3)