11-27-2007
Quote:
Originally Posted by
andyblaylock
Thankyou for your response.
Im presuming that I would need to be in vi to run the search command?
why are you presuming that?
Quote:
Originally Posted by
andyblaylock
Or can I run this from my regular user prompt?
yes
Quote:
Originally Posted by
andyblaylock
I have lots of files in one directory so to run vi I would need to consolidate all these files into one big file and run vi on the one consolidated file and complete the search??
Andy
I don't understand what 'vi' has to do what you're trying to do...
Copy a sample set of files to a 'sand-box' directory and execute the script on this directory ONLY. Once satisfied with the result - proceed to the 'real' thing.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to replace the 3rd colum? Each line begins similarly, but they all ends variously.
XX YY 03 variable text here
XX YY 03 more variable text here
XX YY 03 even more variable text here really long setence
XX YY 03 variable numbers also appear 03 11. 123 456
XX YY 03 the occasional comma,... (4 Replies)
Discussion started by: ajp7701
4 Replies
2. UNIX for Dummies Questions & Answers
I have a space delimited text file with 1,000,000+ columns and 100 rows. I want to delete columns 2 through 5 (2 and 5) included from the text file. How do I do that? Thanks. (3 Replies)
Discussion started by: evelibertine
3 Replies
3. UNIX for Dummies Questions & Answers
I have this space delimited large text file with more than 1,000,000+ columns and about 100 rows. I want to delete all the cells that consist of just 2 (leave 2's that are not by themselves intact):
File before modification
aa bb cc 2 NA100 dd
aa b1 c2 2 NA102 de
File after modification... (1 Reply)
Discussion started by: evelibertine
1 Replies
4. UNIX for Dummies Questions & Answers
How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies
5. UNIX for Dummies Questions & Answers
I have a space delimited text file with 1,000,000+ columns? I would only like to view specific ones (let's say through 1:10), how can I do that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file that looks like the following:
250 rs10000056 0.04 0.0888 4 189321617
250 rs10000062 0.05 0.0435 4 5254744
250 rs10000064 0.02 0.2403 4 127809621
250 rs10000068 0.01 NA
250 rs1000007 0.00 0.9531 2 237752054
250 rs10000081 0.03 0.1400 4 17348363... (5 Replies)
Discussion started by: evelibertine
5 Replies
7. UNIX for Dummies Questions & Answers
I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies
8. UNIX for Dummies Questions & Answers
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
How do you swap two rows in a space delimited text file? Thanks! (4 Replies)
Discussion started by: evelibertine
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies
LEARN ABOUT DEBIAN
test::fixme
Test::Fixme(3pm) User Contributed Perl Documentation Test::Fixme(3pm)
NAME
Test::Fixme - check code for FIXMEs.
SYNOPSIS
# In a test script like 't/test-fixme.t'
use Test::Fixme;
run_tests();
# You can also tailor the behaviour.
use Test::Fixme;
run_tests( where => 'lib', # where to find files to check
match => 'TODO', # what to check for
skip_all => $ENV{SKIP} # should all tests be skipped
);
DESCRIPTION
When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally
happens is that the coder adds comments like:
# FIXME - what about windows that are bigger than the screen?
# FIXME - add checking of user priviledges here.
Test::Fixme allows you to add a test file that ensures that none of these get forgotten in the module.
Arguments
By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or
'match' as follows:
run_tests( where => 'lib', # just check the modules.
match => 'TODO' # look for things that are not done yet.
);
where
Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a listref containing
multiple directory names.
match
Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example:
match => qr/[T]ODO|[F]IXME|[B]UG/,
filename_match
Expression to filter file names. This should be a qr//-quoted regular expression. For example:
match => qr/.(:pm|pl)$/,
would only match .pm and .pl files under your specified directory.
HINTS
If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this:
run_tests( match => 'TO'.'DO' );
You may also wish to suppress the tests - try this:
use Test::Fixme;
run_tests( skip_all => $ENV{SKIP_TEST_FIXME} );
You can only run run_tests once per file. Please use several test files if you want to run several different tests.
SEE ALSO
Devel::FIXME
AUTHOR
Edmund von der Burg <evdb@ecclestoad.co.uk>
Please let me know if you have any comments or suggestions.
<http://ecclestoad.co.uk/>
ACKNOWLEDGMENTS
Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many
thanks.
LICENSE
Copryight (C) 2008 Edmund von der Burg "<evdb@ecclestoad.co.uk">
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
perl v5.10.0 2009-03-12 Test::Fixme(3pm)