Sponsored Content
Top Forums Programming Problem in getting the correct number from the string. Post 302320829 by thanhdat on Friday 29th of May 2009 04:56:35 AM
Old 05-29-2009
This sick command could do the trick
Code:
sed 's/BOOK/\nBOOK/g' youfile.txt | sed 's/BOOK-SEC-\([1-9]\).*/\1/g'

There must be smarter way to do that but i didn't find out yet.

Last edited by thanhdat; 05-29-2009 at 06:22 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

will reinstalling correct my problem??

about 2 months ago i installed mandrake linux 8.0 however due to my current internet setup (dial up upsteam, and cable downstream) i was never able to get it configured properly so i gave up untill i could change to an all cable isp...well that day is tomorrow!!! what i would like to know is... (1 Reply)
Discussion started by: justchillin
1 Replies

2. Shell Programming and Scripting

sed problem - replacement string should be same length as matching string.

Hi guys, I hope you can help me with my problem. I have a text file that contains lines like this: 78 ANGELO -809.05 79 ANGELO2 -5,000.06 I need to find all occurences of amounts that are negative and replace them with x's 78 ANGELO xxxxxxx 79... (4 Replies)
Discussion started by: amangeles
4 Replies

3. Shell Programming and Scripting

checking invoice number not correct

hello, I have the following script to check the invoice number is in order or not. However, it cannot show out the correct information. My expect output show below and I would like to only list out the NOT IN SEQUENCE inovice number (not included "ok") #!/bin/sh start=1 for file_number in... (8 Replies)
Discussion started by: happyv
8 Replies

4. Solaris

Problem in appending the correct log

Hi All, I have a perl module TrxLog.pm and following are codes in it #!/usr/local/bin/perl package TrxLog; %log_begin=""; %log_end=""; %log_msg=""; %log_start_time=""; %log_end_time=""; $ix=0; @arr_msg=""; if (! -e "TrxLog.txt"){ open (TRX,">TrxLog.txt"); }else{ ... (1 Reply)
Discussion started by: megh
1 Replies

5. Shell Programming and Scripting

string to number problem

Hi actually what happen i have taken a value from database table and stored in variable and that value is 20100601 000000 but this value is stored as string value in database table so after storing this value in variable a when i did operation on this a variable like a=`expr ${a} +1` i m... (1 Reply)
Discussion started by: aishsimplesweet
1 Replies

6. Shell Programming and Scripting

changing number in bash (number is in form of string)

I have a txt file as database. when i run my program what it does is it ask me for 3 name and stored in the file as name1:name2:name3:1 when u enter 3 name it add those in file as above format and add 1 at the end. I what i want is if i enter same names again it changes that 1 to 2 and so... (3 Replies)
Discussion started by: Learnerabc
3 Replies

7. Shell Programming and Scripting

Not showing the correct string...

Scripting GURU, I have written a ksh script to get a number from a file and attempting to input the number into the sendsms output script.. But i am finding that ONCALL_NUMBER is showing as $ONCALL_NUMBER as the output for the TO:$ONCALL_NUMBER@sms.info.com message and not as... (3 Replies)
Discussion started by: Junes
3 Replies

8. UNIX for Beginners Questions & Answers

Concatenate a string and number and compare that with another string in awk script

I have below code inside my awk script if ( $0 ~ /SVC IN:/ ) { svc_in=substr( $0,23 , 3); if (msg_start == 1 && msg_end == 0) { msg_arr=$0; } } else if ( $0 ~ /^SVC OUT:/ ) { svc_out=substr( $0, 9, 3); if (msg_start == 1 && msg_end == 0) ... (6 Replies)
Discussion started by: bhagya123
6 Replies

9. UNIX for Beginners Questions & Answers

Getting correct port number from process id

Hi All, i am trying to find the Jobss port number(either default port number or any other port number assigned) from the running process id. But it's giving me multiple port numbers when searching with netstat command. Can someone help me in finding the correct port number from the... (3 Replies)
Discussion started by: sravani25
3 Replies

10. Programming

Python : Problem with " TypeError: float() argument must be a string or a number "

Hello ! I'm creating a CGI which allow to display graph from some data. The datas looks like : 2020-01-13-00-00,384.00,350.00 2020-01-13-06-00,384.00,350.00 2020-01-13-12-00,384.00,350.00 2020-01-13-18-00,384.00,350.00 2020-01-14-00-00,384.00,350.00... (1 Reply)
Discussion started by: Tim2424
1 Replies
Biber::Section(3pm)					User Contributed Perl Documentation				       Biber::Section(3pm)

NAME
Biber::Section - Biber::Section objects new Initialize a Biber::Section object reset_caches Reset section caches which need it has_badcasekey Returns a value to say if we've seen a key differing only in case before <previouskey> - we've seen a differently cased variant of this key so we can warn about this undef - Not seen this key at all in any case variant before add_everykey Adds a datasource key to the section list of all datasource keys del_everykeys Delete everykey cache. For use in tests. has_everykey Returns a boolean to say if we've seen a key in any datasource for this section. This used to be an array ref which was checked using first() and it was twenty times slower. allkeys Sets flag to say citekey '*' occurred in citekeys is_allkeys Checks flag which says citekey '*' occurred in citekeys bibentry Returns a Biber::Entry object for the given citation key bibentries Return Biber::Entries object for this section del_bibentries Delete all Biber::Entry objects from the Biber::Section object set_citekeys Sets the citekeys in a Biber::Section object set_orig_order_citekeys Sets the original order of citekeys in a Biber::Section object get_citekeys Gets the citekeys of a Biber::Section object Returns a normal array get_static_citekeys Gets the citekeys of a Biber::Section object excluding dynamic set entry keys Returns a normal array add_undef_citekey Adds a citekey to the Biber::Section object as an undefined key. This allows us to output this information to the .bbl and so biblatex can do better reporting to external utils like latexmk get_undef_citekeys Gets the list of undefined citekeys of a Biber::Section object Returns a normal array get_orig_order_citekeys Gets the citekeys of a Biber::Section object in their original order This is just to ensure we have a method that will return this, just in case we mess about with the order at some point. This is needed by citeorder sorting. has_citekey Returns true when $key is in the Biber::Section object del_citekey Deletes a citekey from a Biber::Section object del_citekeys Deletes all citekeys from a Biber::Section object add_citekeys Adds citekeys to the Biber::Section object set_citekey_alias Set citekey alias information get_citekey_alias Get citekey alias information del_citekey_alias Delete citekey alias get_citekey_aliases Get a list of all citekey aliases for the section set_labelcache_v Sets the variable label disambiguation cache for a field get_labelcache_v Gets the variable label disambiguation cache for a field set_labelcache_l Sets the list label disambiguation cache for a field get_labelcache_l Gets the list label disambiguation cache for a field set_dynamic_set Record a mapping of dynamic key to member keys get_dynamic_set Retrieve member keys for a dynamic set key Check on has reference returning anything stop spurious warnings about empty dereference in return. dynamic_set_keys Retrieve all dynamic set keys add_datasource Adds a data source to a section set_datasources Sets the data sources for a section get_datasources Gets an array of data sources for this section add_list Adds a section list to this section get_lists Returns an array ref of all section lists get_list Returns a specific list by label add_sort_cache Adds a scheme/keys pair to the sort cache: [$scheme, $keys, $sortinitdata, $extraalphadata, $extrayeardata ] get_sort_cache Retrieves the sort cache number Gets the section number of a Biber::Section object AUTHORS
Francois Charette, "<firmicus at ankabut.net>" Philip Kime "<philip at kime.org.uk>" BUGS
Please report any bugs or feature requests on our sourceforge tracker at <https://sourceforge.net/tracker2/?func=browse&group_id=228270>. COPYRIGHT &; LICENSE Copyright 2009-2012 Francois Charette and Philip Kime, all rights reserved. This module is free software. You can redistribute it and/or modify it under the terms of the Artistic License 2.0. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. perl v5.14.2 2012-06-17 Biber::Section(3pm)
All times are GMT -4. The time now is 02:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy