Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Script to list Sequential files Post 303045986 by MadeInGermany on Tuesday 21st of April 2020 02:43:51 AM
Old 04-21-2020
Each character set [ ] matches one character
Code:
find ~/ -name 'bin.000[0-9][0-9][0-9]'


Last edited by MadeInGermany; 04-21-2020 at 06:04 PM.. Reason: Rephrased
 

10 More Discussions You Might Find Interesting

1. Programming

indexed sequential access in c files

hi, I want to implement indexed sequential access method in my flat file, Any idea other than INFORMIX C-ISAM library, because it is not free ware, Any Freeware available? (0 Replies)
Discussion started by: vrkiruba
0 Replies

2. Shell Programming and Scripting

running script sequential

I have 4 scripts I need to run sequentially(can't run simultaneously) What's the syntax for it? I am running Korn Shell. Thanks, (2 Replies)
Discussion started by: ocjunky
2 Replies

3. Programming

Reading special characters while converting sequential file to line sequential

We have to convert a sequential file to a 80 char line sequential file (HP UX platform).The sequential file contains special characters. which after conversion of the file to line sequential are getting coverted into "new line" or "tab" and file is getting distorted. Is there any way to read these... (2 Replies)
Discussion started by: Rajeshsu
2 Replies

4. UNIX for Advanced & Expert Users

listing sequential files as one group...

Hi, I posted this over at Macnn and was redirected here... I'm not a unix programmer at all, but I have some backup if needed. Thanks in advance for any input. Is there a command for the osX terminal that will list sequentially numbered groups of file as one line instead of individually,... (1 Reply)
Discussion started by: kentm
1 Replies

5. UNIX for Dummies Questions & Answers

Sequential execution in shell script?

I've a shell script that invokes a URL of an application to do some work, e.g., http://www.abc.com/myservlet?action=helloworld.Does the shell wait for a return value from the URL call before proceeding to the next line of command? (6 Replies)
Discussion started by: chengwei
6 Replies

6. UNIX for Dummies Questions & Answers

merging of files ! not in sequential in paralel

Hi , I am having 3 files as FILE1 1 2 3 FILE2 4 5 6 FILE3 7 8 9 I want to merge thes file such that the resultnt file should be as (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

7. Programming

Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX

Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies

8. Shell Programming and Scripting

Rename files in sub directories with sequential numbers

I can rename a file with sequential numbers from 1 to N with this script: num=1 for file in *.dat;do mv "$file" "$(printf "%u" $num).txt" let num=num+1 done The script begins with renaming a some.dat file to 1.dat.txt and goes on sequentially renaming other DAT files to... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. Shell Programming and Scripting

Execute sequential files and store data in single file

1)In a particualr path i have a set of inputfiles like path:/defaultmis/MonthlyLoads/INFA_EXPORT_022013/map* example: 1)map_de 2)map_cod 3)map_feg ........and so on in above path there wil be nearly 15 to 20 files starting with map and in other path i have another file input file... (4 Replies)
Discussion started by: katakamvivek
4 Replies

10. Shell Programming and Scripting

Run sequential test files

I have c program that I run like this: ./a.out t1 And my test files look like this all the way up to 100: t1 t2 t3 Is there a way to run this more efficiently so I don't have to hit up and change the number every time? (4 Replies)
Discussion started by: cokedude
4 Replies
Format(3pm)						User Contributed Perl Documentation					       Format(3pm)

NAME
Locale::Currency::Format - Perl functions for formatting monetary values SYNOPSIS
use Locale::Currency::Format; $amt = currency_format('USD', 1000); # => 1,000.00 USD $amt = currency_format('EUR', 1000, FMT_COMMON); # => EUR1.000,00 $amt = currency_format('USD', 1000, FMT_SYMBOL); # => $1,000.00 $sym = currency_symbol('USD'); # => $ $sym = currency_symbol('GBP', SYM_HTML); # => &#163; $decimals = decimal_precision('USD'); # => 2 $decimals = decimal_precision('BHD'); # => 3 $thou_sep = thousands_separator('USD'); # => , $thou_sep = thousands_separator('EUR'); # => . $dec_sep = decimal_separator('USD'); # => . $dec_sep = decimal_separator('EUR'); # => , currency_set('USD', '#.###,## $', FMT_COMMON); # => set custom format currency_format('USD', 1000, FMT_COMMON); # => 1.000,00 $ currency_set('USD'); # => reset default format The following example illustrates how to use Locale::Currency::Format with Mason. Skip it if you are not interested in Mason. A simple Mason component might look like this: Total: <% 123456789, 'eur' |c %> <%init> use Locale::Currency::Format; $m->interp->set_escape(c => &escape_currency); sub escape_currency { my ($amt, $code) = ${$_[0]} =~ /(.*?)([A-Za-z]{3})/; ${$_[0]} = currency_format($code, $amt, FMT_HTML); } </%init> DESCRIPTION
Locale::Currency::Format is a light-weight Perl module that enables Perl code to display monetary values in the formats recognized internationally and/or locally. "currency_format(CODE, AMOUNT [, FORMAT])" currency_format takes two mandatory parameters, namely currency code and amount respectively, and optionally a third parameter indicating which format is desired. Upon failure, it returns undef and an error message is stored in $Locale::Currency::Format::error. CODE A 3-letter currency code as specified in ISO 4217. Note that old code such as GBP, FRF and so on can also be valid. AMOUNT A numeric value. FORMAT There are five different format options FMT_STANDARD, FMT_COMMON, FMT_SYMBOL, FMT_HTML and FMT_NAME. If it is omitted, the default format is FMT_STANDARD. FMT_STANDARD Ex: 1,000.00 USD, 1.000.000,00 EUR FMT_SYMBOL Ex: $1,000.00 FMT_COMMON Ex: 1.000 Dong (Vietnam), BEF 1.000 (Belgium) FMT_HTML Ex: &#xA3;1,000.00 (pound-sign HTML escape) FMT_NAME Ex: 1,000.00 US Dollar NOTE: By default the trailing zeros after the decimal point will be added. To turn it off, do a bitwise C<or> of FMT_NOZEROS with one of the five options above. Ex: FMT_STANDARD | FMT_NOZEROS will give 1,000 USD "currency_symbol(CODE [, TYPE])" For conveniences, the function currency_symbol is provided for currency symbol lookup given a 3-letter currency code. Optionally, one can specify which format the symbol should be returned - Unicode-based character or HTML escape. Default is a Unicode-based character. Upon failure, it returns undef and an error message is stored in $Locale::Currency::Format::error. CODE A 3-letter currency code as specified in ISO 4217 TYPE There are two available types SYM_UTF and SYM_HTML SYM_UTF returns the symbol (if exists) as an Unicode character SYM_HTML returns the symbol (if exists) as a HTML escape "decimal_precision(CODE)" For conveniences, the function decimal_precision is provided to lookup the decimal precision for a given 3-letter currency code. Upon failure, it returns undef and an error message is stored in $Locale::Currency::Format::error. CODE A 3-letter currency code as specified in ISO 4217 "decimal_separator(CODE)" For conveniences, the function decimal_separator is provided to lookup the decimal separator for a given 3-letter currency code. Upon failure, it returns undef and an error message is stored in $Locale::Currency::Format::error. CODE A 3-letter currency code as specified in ISO 4217 "thousands_separator(CODE)" For conveniences, the function thousands_separator is provided to lookup the thousands separator for a given 3-letter currency code. Upon failure, it returns undef and an error message is stored in $Locale::Currency::Format::error. CODE A 3-letter currency code as specified in ISO 4217 "currency_set(CODE [, TEMPLATE, FORMAT])" currency_set can be used to set a custom format for a currency instead of the provided format. For example, in many non-English speaking countries, the US dollars might be displayed as 2.999,99 $ instead of the usual $2,999.99. In order to accomplish this, one will need to do as follows: use Locale::Currency::Format qw(:default $error); my $currency = 'USD'; my $template = '#.###,## $'; if (currency_set($currency, $template, FMT_COMMON)) { print currency_format($currency, 2999.99, FMT_COMMON), " "; } else { print "cannot set currency format for $currency: $error "; } The arguments to currency_set are: CODE A 3-letter currency code as specified in ISO 4217 TEMPLATE A template in the form #.###,##$, #.### kr, etc. If a unicode character is used, make sure that the template is double-quoted. Ex: currency_set('GBP', "x{00A3}#,###.##", FMT_SYMBOL) If an HTML symbol is wanted, escape its equivalent HTML code. Ex: currency_set('GBP', '&#x00A3;#,###.##', FMT_HTML) FORMAT This argument is required if TEMPLATE is present. The formats FMT_SYMBOL, FMT_COMMON, FMT_HTML are accepted. NOTE! FMT_STANDARD and FMT_NAME will always be in the form <amount><space><code|name> such as 1,925.95 AUD. Hence, currency_set returns an error if FMT_STANDARD or FMT_NAME is specified as FORMAT. With FMT_COMMON, you can always achieve what you would have done with FMT_STANDARD and FMT_NAME, as follows my $amt = 1950.95; currency_set('USD', 'USD #.###,##', FMT_COMMON); print currency_format('USD', $amt, FMT_COMMON); # USD 1,950.95 currency_set('USD', 'US Dollar #.###,##', FMT_COMMON); print currency_format('USD', $amt, FMT_COMMON); # US Dollar 1,950.95 Invoking currency_set with one argument will reset all formats to their original settings. For example currency_set('USD') will clear all previous custom settings for the US currency (ie. FMT_SYMBOL, FMT_HTML, FMT_COMMON). A WORD OF CAUTION Please be aware that some currencies might have missing common format. In that case, currency_format will fall back to FMT_STANDARD format. Also, be aware that some currencies do not have monetary symbol. As countries merge together or split into smaller ones, currencies can be added or removed by the ISO. Please help keep the list up to date by sending your feedback to the email address at the bottom. To see the error, examine $Locale::Currency::Format::error use Locale::Currency::Format; my $value = currency_format('USD', 1000); print $value ? $value : $Locale::Currency::Format::error OR use Locale::Currency::Format qw(:DEFAULT $error); my $value = currency_format('USD', 1000); print $value ? $value : $error Lastly, please refer to perluniintro and perlunicode for displaying Unicode characters if you intend to use FMT_SYMBOL and currency_symbol. Otherwise, it reads "No worries, mate!" SEE ALSO
Locale::Currency, Math::Currency, Number::Format, perluniintro, perlunicode BUGS
If you find any inaccurate or missing information, please send your comments to tnguyen@cpan.org. Your effort is certainly appreciated! CONTRIBUTOR(S) James Kiser <james.kiser@gmail.com> AUTHOR
Tan D Nguyen <tnguyen@cpan.org> COPYRIGHT
This library is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License. perl v5.12.4 2011-07-11 Format(3pm)
All times are GMT -4. The time now is 10:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy