Hi ,
I have query regarding to get a program name given a pid in HP-Ux .
give procees id ( PID) i would like to retrieve the process/program through a C program ?
my input to c program will be will be pid and i would like to know what is process name /program name .
Many Thanks ... (1 Reply)
Hello
I am getting error when the file (Folder or Application) path having space is given as external input to the shell program.
It works fine for the files which has no spaces in the file name
Thans, (5 Replies)
needa c program to extract text between two delimiters from some text file.
and then storing them in to diffrent variables ?
text file like 0:
abc.txt
=========
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass
aaaaaa|11111111|sssssssssss|333333|ddddddddd|34343454564|asass... (7 Replies)
i have a program ABC, which runs every two minutes and takes the input according to the a value called "pointer"
files need to be processed by ABC are
input0001
input0002
input0003
input0004
input0005
current value of pointer is 0001, now program runs and takes all the files from... (2 Replies)
Hey, I was trying to figure out how to launch a program from the command line, and it works if you pass it a config file. I was thinking about writing a script to dynamically create the config file and pass it to the command using something like command substitution (so I don't actually have to... (3 Replies)
I have a good foundation of c++.I want to learn to program for linux/unix,can you give me some advises,for example classic books ,which operating system is used better(freebsd,solaris,federal linux.etc),and which aspects uses mostly in job.Can you give me clear direction for working or learning. (1 Reply)
I have a shell script that is attempting to call a c program.
I call the c program with ./dictool
dictool accepts arguments at runtime. It works by prompting the user for various commands, acting on those commands, spitting out an output, and then prompting for more commands.
My question is,... (1 Reply)
Hello everyone,
I think this would be easy for you experts.
Refering the suggestion that Scrutinizer gave me in this thread https://www.unix.com/302612499-post13.html
I have the script in this form
awk '{$1=$1}1' "$1" | awk ' ...'
Where "$1" takes the value of "inputfile" then I can... (1 Reply)
HI
i have written a script to ask input from the user.
this script should promote the user for y/n input. if user enters anyother input then y/n
the script promotes him again. this below code is working fine for all the cases.
except for space and enter " if i give space and enter it is... (2 Replies)
Hi ,
when i am logging to the server i need to give input of specific key like k or l or m etc. and then need to put enter. need to use this in script . please assist. (1 Reply)
Discussion started by: rupesh.bombale
1 Replies
LEARN ABOUT DEBIAN
test::regression
Test::Regression(3pm) User Contributed Perl Documentation Test::Regression(3pm)NAME
Test::Regression - Test library that can be run in two modes; one to generate outputs and a second to compare against them
VERSION
Version 0.05
SYNOPSIS
use Test::Regression;
ok_regression(sub {return "hello world"}, "t/out/hello_world.txt");
DESCRIPTION
Using the various Test:: modules you can compare the output of a function against what you expect. However if the output is complex and
changes from version to version, maintenance of the expected output could be costly. This module allows one to use the test code to
generate the expected output, so that if the differences with model output are expected, one can easily refresh the model output.
EXPORT
ok_regression
FUNCTIONS
ok_regression
This function requires two arguments: a CODE ref and a file path. The CODE ref is expected to return a SCALAR string which can be compared
against previous runs. If the TEST_REGRESSION_GEN is set to a true value, then the CODE ref is run and the output written to the file.
Otherwise the output of the file is compared against the contents of the file. There is a third optional argument which is the test name.
ENVIRONMENT VARIABLES
TEST_REGRESSION_GEN
If the TEST_REGRESSION_GEN environment file is unset or false in a perl sense, then the named output files must exist and be readable and
the test will run normally comparing the outputs of the CODE refs against the contents of those files. If the environment variable is true
in a perl sense, then model output files will be overwritten with the output of the CODE ref.
AUTHOR
Nicholas Bamber, "<nicholas at periapt.co.uk>"
BUGS
Please report any bugs or feature requests to "bug-test-regression at rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Regression>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
testing of STDERR
The testing of stderr from this module is not as thorough as I would like. Test::Builder::Tester allows turning off of stderr checking but
not matching by regular expression. Handcrafted efforts currently fall foul of Test::Harness. Still it is I believe adequately tested in
terms of coverage.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::Regression
You can also look for information at:
o RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Regression>
o AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/Test-Regression>
o CPAN Ratings
<http://cpanratings.perl.org/d/Test-Regression>
o Search CPAN
<http://search.cpan.org/dist/Test-Regression/>
ACKNOWLEDGEMENTS
Some documentation improvements have been suggested by toolic (http://perlmonks.org/?node_id=622051).
Thanks to Filip GraliXski for pointing out I need to test against output of zero length and providing a patch.
COPYRIGHT & LICENSE
Copyright 2009-10 Nicholas Bamber.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as
published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
perl v5.10.1 2010-08-29 Test::Regression(3pm)