Sponsored Content
Top Forums Shell Programming and Scripting strip first 4 and last 2 lines from a file using perl Post 302163653 by KevinADC on Friday 1st of February 2008 08:01:23 PM
Old 02-01-2008
see you other thread for suggestion
 

9 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

add lines in file with perl

How to search string like: a and replace to a a a : : a in a file with perl? Thanks, Grace (6 Replies)
Discussion started by: jinsh
6 Replies

3. Shell Programming and Scripting

how do i strip this line using perl regex.

I have a variable dynamically generated $batch = /dataload/R3P/interface/Bowne/reports/RDI00244.rpt Now I'd like to strip '/dataload/R3P/interface/Bowne/reports/RDI' and '.rpt' from this variable my output should be only 00244 how to do this using perl regex.I'm a newbie to perl and would... (1 Reply)
Discussion started by: ramky79
1 Replies

4. Shell Programming and Scripting

How to remove the lines from file using perl

Can anyone tell me what could be the solution to following : I have one .txt file which contains some seed information. This seed may appear multiple time in the file so what I want do is if this seed appears again in the file then that line should be removed. here is the contents of .txt... (5 Replies)
Discussion started by: dipakg
5 Replies

5. Shell Programming and Scripting

Strip one line from 2 blank lines in a file

Hi Is there any command to scan thru a file looking for 2 consecutive blank lines and if any remove one of them. Please let me know. Regards, Tipsy (6 Replies)
Discussion started by: tipsy
6 Replies

6. Shell Programming and Scripting

How to Strip lines off Streamed EDI Output

Attached is a streamed EDI ANSI X12 output where the segment terminator/delimiter is a tilde ~ character. Is it possible to do the following pseudo-code in a unix script (using either sed, awk and/or grep)? Open file StreamedOutput.txt Search for ISA and delete the data up to the tilde ~ char... (7 Replies)
Discussion started by: sapedi
7 Replies

7. Shell Programming and Scripting

Trying to strip some character in perl

I have some character strings and I would like to know how can I remove them using perl. My file contains the following output shown below. An example of a string in the file: + netmck(uid=500)-root + netmck(uid=500)-root + netmck(uid=500)-root + netmck(uid=0)-root . . . I would... (1 Reply)
Discussion started by: smlushing
1 Replies

8. Shell Programming and Scripting

How to get the lines matched of a file in perl?

Hi, I want to match the time in the file and retrieve those contents of the file. I am taking only first two parameters of localtime(time) function minutes and seconds so partial match i am performing. For Example $start = "14:23"; $end = "14:30"; I am matching file contents... (3 Replies)
Discussion started by: vanitham
3 Replies

9. Shell Programming and Scripting

How to delete lines from a file in PERL?

Hi, I have 500 MB of file. I want to retain first line and last line of the file. I am unaware of deleting lines from a file in PERL. How can i do it in PERL? Regards VANITHA (3 Replies)
Discussion started by: vanitham
3 Replies
Module::Manifest::Skip(3pm)				User Contributed Perl Documentation			       Module::Manifest::Skip(3pm)

NAME
Module::Manifest::Skip - MANIFEST.SKIP Manangement for Modules SYNOPSIS
From the command line: > perl -MModule::Manifest::Skip=create From Perl: use Module::Manifest::Skip; use IO::All; my $mms = Module::Manifest::Skip->new; # optional add and removes: $mms->add('^foo-bar$'); $mms->remove('^foo$'); $mms->remove(qr/Qfoo/); io('MANIFEST.SKIP')->print($mms->text); DESCRIPTION
NOTE: This module is mostly intended for module packaging frameworks to share a common, up-to-date "MANIFEST.SKIP" base. For example, Module::Install::ManifestSkip, uses this module to get the actual SKIP content. However this module may be useful for any module author. CPAN module authors use a MANIFEST.SKIP file to exclude certain well known files from getting put into a generated MANIFEST file, which would cause them to go into the final distribution package. The packaging tools try to automatically skip things for you, but if you add one of your own entries, you have to add all the common ones yourself. This module attempts to make all of this boring process as simple and reliable as possible. Module::Manifest::Skip can create or update a MANIFEST.SKIP file for you. You can add your own entries, and it will leave them alone. You can even tell it to not skip certain entries that it normally skips, although this is rarely needed. USAGE
Usually this module is called by other packaging modules. If you want this to be used by Module::Install, then you would put this: manifest_skip 'clean'; in your Makefile.PL, and everything would be taken care of for you. If you want to simply create a MANIFEST.SKIP file from the command line, this handy syntax exists: > perl -MModule::Manifest::Skip=create BEHAVIOR
This module ships with a share file called share/MANIFEST.SKIP. This is the basis for all new MANIFEST.SKIP files. This module will look for an already existing MANIFEST.SKIP file and take all the text before the first blank line, and prepend it to the start of a new SKIP file. This allows you to put your own personal section at the top, that will not be overwritten later. It will then look for lines beginning with a dash followed by a space. Like this: - foo - ^bar/ - ^baz$ It will comment out each of these lines and any other lines that match the text (after the '- '). This allows you to override the default SKIPs. AUTHOR
Ingy doet Net COPYRIGHT AND LICENSE
Copyright (c) 2011. Ingy doet Net. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html perl v5.14.2 2011-10-08 Module::Manifest::Skip(3pm)
All times are GMT -4. The time now is 08:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy