Sponsored Content
Full Discussion: Print header and some lines
Top Forums Shell Programming and Scripting Print header and some lines Post 302770016 by MadeInGermany on Thursday 14th of February 2013 07:19:09 AM
Old 02-14-2013
As described in man df, you can have the desired item (device path or mount path) as extra argument:
Code:
df -h /Network/Test

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Strip 3 header lines and 4 trailer lines

Hello friends, I want to remove 3 header lines and 4 trailer lines, I am using following , is it correct ? sed '1,3d';'4,$ d' filename (9 Replies)
Discussion started by: ganesh123
9 Replies

2. Shell Programming and Scripting

print lines except the header

awk -F ";" '{if($10>80 && NR>1) print $0 }' txt_file_* I am using this command to print the lines which has 10th field more then 80 and leaving the first line of the file which is the header. But this is not working , the first line is is coming as output , please correct me . thanks (2 Replies)
Discussion started by: madfox
2 Replies

3. Shell Programming and Scripting

print lines AFTER lines cointaining a regexp (or print every first and fourth line)

Hi all, This should be very easy but I can't figure it out... I have a file that looks like this: @SRR057408.1 FW8Y5CK02R652T length=34 AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT +SRR057408.1 FW8Y5CK02R652T length=34 FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8 @SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies

4. Shell Programming and Scripting

Print column header

Hi, Below is the data in a tab limited file Here ACCENT is just a heading and the line starting with Pcode has the column headers, and there is a 2 lines space between the file header and column header. I want to print $2, that is Dealer Name I used the below code nawk... (1 Reply)
Discussion started by: kedar_laveti
1 Replies

5. Shell Programming and Scripting

If condition satisfies print the column header

Dear All, Good Day. I would like to solve the following issue and got some strange results, if anyone could help me in this regard, you are most welcome. Here is the problem: I have a file like Header Value1 Value2 Value3 Value4 Value5 Value6 ... Value9 12.144 6 5 ... (8 Replies)
Discussion started by: Fredrick
8 Replies

6. Shell Programming and Scripting

Print the column content based on the header

i have a input of csv file as below but the sequence of column get changed. I,e it is not necessary that name comes first then age and rest all, it may vary. name,age,marks,roll,section kevin,25,80,456,A Satch,23,56,789,B Meena,24,78,H245,C So i want to print that column entires which... (12 Replies)
Discussion started by: millan
12 Replies

7. Shell Programming and Scripting

Print Missing Header Name from File.

HI Guys, I have file A.txt ID,L1,L2,L3,L4 1A,2a,33a,44b,55c 2A,10a,14a,15b,16c File B.txt ID L1 L4 L5 Output:- ID,L1,L4,L5 (2 Replies)
Discussion started by: pareshkp
2 Replies

8. Shell Programming and Scripting

Print header and lines that meet both conditions in awk

In the awk below I am trying to print only the header lines starting with # or ## and the lines that $7 is PASS and AF= is less than 5%. The awk does execute but returns an empty file and I am not sure what I am doing wrong. Thank you. file ... (0 Replies)
Discussion started by: cmccabe
0 Replies

9. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

10. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
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)
All times are GMT -4. The time now is 09:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy