Sponsored Content
Top Forums Shell Programming and Scripting How to continue numbering after a regular expression has been found Post 302495489 by vgersh99 on Thursday 10th of February 2011 11:36:48 AM
Old 02-10-2011
Code:
nawk -F'[ =]' 'NF>1{start=$5;next}{print start++,$0}' myFile

This User Gave Thanks to vgersh99 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Regular Expression + Aritmetical Expression

Is it possible to combine a regular expression with a aritmetical expression? For example, taking a 8-numbers caracter sequece and casting each output of a grep, comparing to a constant. THX! (2 Replies)
Discussion started by: Z0mby
2 Replies

2. Shell Programming and Scripting

Continue Script when File Found

Hello All, I am trying to write a script that will only continue executing my script if a file exits. I know the directory of the file, so its just a matter of seeing if the file exists yet. If the file has not yet been created, I want the script to wait 10 minutes (600 seconds) and try again.... (7 Replies)
Discussion started by: Jose Miguel
7 Replies

3. UNIX for Dummies Questions & Answers

regular expression..help!!

need regular expression matches: abc11_efg11_123.xml abc11_123.xml Thank you Andy (1 Reply)
Discussion started by: andy2000
1 Replies

4. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

5. Shell Programming and Scripting

Regular Expression help

Hi, Example ^www\.+\.host\.com$ I would like to know what the bold parts means. thanks (2 Replies)
Discussion started by: phamp008
2 Replies

6. Shell Programming and Scripting

Integer expression expected: with regular expression

CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error. source $CA_VERSION_DATA if * ] then echo "CA_RELESE $CA_RELEASE is invalid" exit -1 fi + source /etc/ncgl/ca_version_data ++ CA_PRODUCT_ID=samxts ++ CA_RELEASE=6 ++ CA_WEEK_NO=7 ++... (3 Replies)
Discussion started by: ketkee1985
3 Replies

7. Shell Programming and Scripting

Would like to print 3 lines after a regular expression is found in the logfile

I would like to print 3 lines after a regular expression is found in the logfile. I'm using the following code: grep -n "$reg_exp" file.txt |while read LINE ;do i=$(echo $LINE |cut -d':' -f1 ) ;sed -n "$i,$(($i+3))p" file.txt ;done The above code things works fine,but sometimes gives erroneous... (3 Replies)
Discussion started by: joachimshaun
3 Replies

8. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

9. UNIX for Advanced & Expert Users

sed: -e expression #1, char 0: no previous regular expression

Hello All, I'm trying to extract the lines between two consecutive elements of an array from a file. My array looks like: problem_arr=(PRS111 PRS213 PRS234) j=0 while } ] do k=`expr $j + 1` sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt ---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies

10. Shell Programming and Scripting

Continue the loop if the value is not found

Dear Help, Is it possible to continue the loop by going to the next available value, if the 'expected value' is not found. I have a list of values which might not get incremented by fixed value and hence the loop could break and the script could terminate. Any suggestion is appreciated. ... (1 Reply)
Discussion started by: Indra2011
1 Replies
Bio::Phenotype::Measure(3pm)				User Contributed Perl Documentation			      Bio::Phenotype::Measure(3pm)

NAME
Bio::Phenotype::Measure - Representation of context/value(-range)/unit triplets SYNOPSIS
use Bio::Phenotype::Measure; my $measure = Bio::Phenotype::Measure->new( -context => "length", -description => "reduced length in 4(Tas1r3)", -start => 0, -end => 15, -unit => "mm", -comment => "see also Miller et al" ); print $measure->context(); print $measure->description(); print $measure->start(); print $measure->end(); print $measure->unit(); print $measure->comment(); print $measure->to_string(); DESCRIPTION
Measure is for biochemically defined phenotypes or any other types of measures. FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR
Christian M. Zmasek Email: czmasek-at-burnham.org or cmzmasek@yahoo.com WWW: http://monochrome-effect.net/ Address: Genomics Institute of the Novartis Research Foundation 10675 John Jay Hopkins Drive San Diego, CA 92121 APPENDIX
The rest of the documentation details each of the object methods. new Title : new Usage : my $me = Bio::Phenotype::Measure->new( -context => "length", -description => "reduced length in 4(Tas1r3)", -start => 0, -end => 15, -unit => "mm", -comment => "see Miller also et al" ); Function: Creates a new Measure object. Returns : A new Measure object. Args : -context => the context -description => a description -start => the start value -end => the end value -unit => the unit -comment => a comment init Title : init() Usage : $measure->init(); Function: Initializes this Measure to all "". Returns : Args : context Title : context Usage : $measure->context( "Ca-conc" ); or print $measure->context(); Function: Set/get for the context of this Measure. Returns : The context. Args : The context (optional). description Title : description Usage : $measure->description( "reduced in 4(Tas1r3)" ); or print $measure->description(); Function: Set/get for the description of this Measure. Returns : A description. Args : A description (optional). start Title : start Usage : $measure->start( 330 ); or print $measure->start(); Function: Set/get for the start value of this Measure. Returns : The start value. Args : The start value (optional). end Title : end Usage : $measure->end( 459 ); or print $measure->end(); Function: Set/get for the end value of this Measure. Returns : The end value. Args : The end value (optional). unit Title : unit Usage : $measure->unit( "mM" ); or print $measure->unit(); Function: Set/get for the unit of this Measure. Returns : The unit. Args : The unit (optional). comment Title : comment Usage : $measure->comment( "see also Miller et al" ); or print $measure->comment(); Function: Set/get for an arbitrary comment about this Measure. Returns : A comment. Args : A comment (optional). to_string Title : to_string() Usage : print $measure->to_string(); Function: To string method for Measure objects. Returns : A string representations of this Measure. Args : perl v5.14.2 2012-03-02 Bio::Phenotype::Measure(3pm)
All times are GMT -4. The time now is 06:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy