---------- Post updated at 03:07 PM ---------- Previous update was at 02:52 PM ----------
One more thing Ygor,
Its working when I am executing from command line, but same is not working when I am putting it in to a script :
Code:
for prm in RUN_COST_PRICES_COMPARISON RUN_SELLING_PRICE_COMPARISON RUN_RATIO_PACK_COMPARISON
> do
> echo $prm
> eval VAR=\$$prm
> echo $VAR
> done
RUN_COST_PRICES_COMPARISON
Y
RUN_SELLING_PRICE_COMPARISON
N
RUN_RATIO_PACK_COMPARISON
Y
But when the same thing kept in the script eval command is not working.
Could you pleases advice if something needs to be added
---------- Post updated at 03:33 PM ---------- Previous update was at 03:07 PM ----------
Quote:
Originally Posted by k_vikash
Thanks a lot
It worked for me !!
---------- Post updated at 03:07 PM ---------- Previous update was at 02:52 PM ----------
One more thing Ygor,
Its working when I am executing from command line, but same is not working when I am putting it in to a script :
Code:
for prm in RUN_COST_PRICES_COMPARISON RUN_SELLING_PRICE_COMPARISON RUN_RATIO_PACK_COMPARISON
> do
> echo $prm
> eval VAR=\$$prm
> echo $VAR
> done
RUN_COST_PRICES_COMPARISON
Y
RUN_SELLING_PRICE_COMPARISON
N
RUN_RATIO_PACK_COMPARISON
Y
But when the same thing kept in the script eval command is not working.
Im facing problem in assigning value of eval array variable as normal variable..
x=0
eval DATA${x}="FJSVcpcu"
x=`expr $x + 1`
eval DATA${x}="FJSVcsr"
if x=0, type -> eval echo \$DATA$x , its give me FJSVcpcu
i want assign this value into an variable as
variable=`eval echo... (3 Replies)
Hello Folks,
I have a script that runs a command (rsync) that sometimes takes a long time to complete and produces diagnostic output on stdout as it runs.
I am currently capturing this output in a variable and using it further in the script. I would like to continue to capture this output... (2 Replies)
Hi,
i have an issue with eval and variable assignment.
1) i have a date value in a variable and that date is part of a filename,
var1=20100331
file1=${var1}-D1-0092.xml.zip
file2=${var2}-D2-0092.xml.zip
file3=${var3}-D3-0092.xml.zip
i am passing the above variables to a script via... (11 Replies)
Hi Folks,
I'm looking to figure something out in an existing script I'm trying to understand.
the command in question(on a Solaris Box using KSH) is: WORKDIR=/tmp/namereplaced.exec.$$.$RANDOM
Now, I know it's setting the $workdir environmental variable...
And I understand most of... (2 Replies)
pattern1=book
{
x=1
eval echo \$pattern$x
}
book (this is the output)
But when I assign a variable to the output of the eval it doesn't work unless I prefix 2 times backslash before $ as shown below.
{
a=`eval echo \\$pattern$x`
echo $a
}
book
Why here twice "\" has to be... (3 Replies)
I have a section of a script where I want to check a log file for a certain oracle error and if there is only one error (and it is ORA-39152) then I want to email that script is complete. Otherwise email failure and log.
Somehow with this while the log only has one error and it is ORA-39152, I... (5 Replies)
Discussion started by: cougartrace
5 Replies
LEARN ABOUT DEBIAN
src2man
src2man(1)src2man(1)NAME
src2man - extract man pages from source files.
SYNOPSIS
src2man [-n][-d date][-v volume][-r release] [srcfile ...]
DESCRIPTION
src2man scans source file srcfile. Only C source files are supported for now. Comments blocks starting by "/** num", where num is a section
number, are converted into a man file, using txt2man(1).
The first line of the comment block must contain the name of the manpage, usually the function name, followed by a "-" and a short
description.
The following lines are the "DESCRIPTION" section content, except if they are in upper case, in which case they define a new sec-
tion.
If the next line after a comment block is empty, Then no "SYNOPSIS" section will be generated. Otherwise, src2man will look in the follow-
ing source lines for a function prototype or a type definion (struct, union, typedef, ...) matching the manpage name, and include it in a
"SYNOPSIS" section.
This avoids to duplicate the type or function prototype in the comment block.
The best place for code documentation is in the source file, where the body is implemented, not the header file which only contains the
prototype. src2man automatically searches for the presence of a prototype in the corresponding header file, and if found, will print a
"#include" statement in the synopsis.
OPTIONS -d date
Set the date of the man pages. Defaults to current date.
-n No man page is created. The name of the manpages that would be created are printed.
-v volume
Specify the name of the volume to be printed in center header of generated manpages.
-r release
Specify the project name and release number for the generated manpage.
EXAMPLE
The following example displays C code and comments to generate a manpage foobar.3:
/** 3
* foobar - a sample dummy function
* This line is now the first of the description section.
* Note that function parameters parm1 and parm2 are highlighted
* in the generated man page.
*/
int foobar(char *parm1, int parm2)
{
...
return 0;
}
SEE ALSO txt2man(1), bookman(1).
AUTHOR
Marc Vertes <mvertes@free.fr>
txt2man-1.5.5 11 April 2011 src2man(1)