hello
have a file1
H87I
Y788O
T347U
J23U
and
file2 J23U U887Y I99U T556U
file3 I99O J99T F557J
file4 N99I T666U R55Y
file5 H87I T347U
file6 H77U R556Y E44T
file7 Y788O K98U H8I
May be using script we can use file1 to search for all the files
and have the output
H87I file5... (3 Replies)
Need shell script to read two file at same time and print output in single file
Example I have two files 1) file1.txt 2) file2.txt
File1.txt contains
Aaa
Bbb
Ccc
Ddd
Eee
Fff
File2.txt contains
Zzz
Yyy
Xxx (10 Replies)
Hi Friends,
I am new to this forum. Just struck up with a logic.
I have a csv file seperated by ":" (colons).
This csv file contains hostname and groups as follows:
HOSTNAME:VT Group
SGSGCT2AVPX001:Team1
SGSGCT2AVPX003:Team2
SGSGCT2AVPX005:Team2
PHMNCTTAVPX001:Team3
I want to... (2 Replies)
I have made a script something like this. I want it to read the contents of either file or directory but 'cat' and 'ls' is not working. Can anyone help me? I am a newbie in scripting so dont know much about it. I also dont know how can i put my code separatly on this forum
#!/bin/bash
echo... (9 Replies)
Hi, I'm trying to implement a C program on ubuntu which reads the contents of a file that is passed in as an argument and then displays it to the screen. So far I've cobbled together this from bits online but most of it is probably wrong as its all copied and pasted...
#include <stdio.h>... (2 Replies)
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Hello,
I have a set of files Xfile0001 - Xfile0021, and the content of this files (one at a time) needs to be printed between some line (lines start with word "Generated") that I am extracting from another file called file7.txt and all the output goes into output.txt. First I tried creating a for... (5 Replies)
Trying to use sed to insert the contents of a file into the end of each line in another file
file1
This is a line
Here is another line
This is yet another line
Here is a fourth line
file2
TEXT
desired output
This is a line TEXT
Here is another line TEXT
This is yet another... (6 Replies)
Like to have shell script to Read the given file contents into a merged one file with header of path+file name followed by file contents into a single output file.
While reading and merging the file contents into a single file, Like to keep the format of the source file.
... (4 Replies)
Discussion started by: Siva SQL
4 Replies
LEARN ABOUT DEBIAN
test::needsdisplay
Test::NeedsDisplay(3pm) User Contributed Perl Documentation Test::NeedsDisplay(3pm)NAME
Test::NeedsDisplay - Ensure that tests needing a display have one
SYNOPSIS
In your Makefile.PL...
use inc::Module::Install;
# ... or whatever else you use
# Check for a display
use Test::NeedsDisplay;
# ... your Makefile.PL content as normal
And again in each test script that loads Wx
#!/usr/bin/perl
use strict;
use Test::NeedsDisplay;
# Test content as normal...
DESCRIPTION
When testing GUI applications, sometimes applications or modules absolutely insist on a display, even just to load a module without
actually showing any objects.
Regardless, this makes GUI applications pretty much impossible to build and test on headless or automated systems. And it fails to the
point of not even running the Makefile.PL script because a dependency needs a display so it can be loaded to find a version.
In these situations, what is needed is a fake display.
The "Test::NeedsDisplay" module will search around and try to find a way to load some sort of display that can be used for the testing.
Strategies for Finding a Display
At this time, only a single method is used (and a very simple one).
Debian Linux has a script called "xvfb-run" which is a wrapper for the "xvfb", a virtual X server which uses the linux frame buffer.
When loaded without a viable display, the module will re-exec the same script using something like (for example) "xvfb-run test.t".
As such, it should be loaded as early as possible, before anything has a chance to change script parameters. These params will be resent
through to the script again.
METHODS
There are no methods. You simply use the module as early as possible, probably right after "use strict;" and make sure to load it with only
default params.
Specifically, need must always load it before you set the test plan, otherwise the test script will report two plans, and the harness will
complain about it and die.
# Use it like this ...
use Test::NeedsDisplay;
# ... not like this ...
use Test::NeedsDisplay 'anything';
# ... and not like this.
use Test::NeedsDisplay ();
And that's all there is to do. The module will take care of the rest.
TO DO
- Find alternative ways to launch a display on different platforms
SUPPORT
Bugs should be reported via the CPAN bug tracker at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-NeedsDisplay>
For other issues, contact the author.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2005 - 2009 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.10.0 2009-01-04 Test::NeedsDisplay(3pm)