Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Convert Overpunch character values to number that comes between the numbers in perl Post 302970503 by nadeemrafikhan on Thursday 7th of April 2016 09:32:21 AM
Old 04-07-2016
Convert Overpunch character values to number that comes between the numbers in perl

I have variable that contains multiple values of number and also includeOverpunch character so we want to replace it with numbers.
here are the example:
Code:
11500#.0#
28575$.5$
527#.7#
42".2"
2794 .4
2279!.9!
1067&.7&
926#.6#
2279!.9!
885".5"
11714$.4$
27361'.1'
2%.2%
533".3"

could you please help me out.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

hw can i count the number of character in a file by perl

i want to count the number of character contained in afile using perl cript help me out (1 Reply)
Discussion started by: trupti_rinku
1 Replies

2. UNIX for Advanced & Expert Users

Req on how to convert hex numbers to decimals

Hi, If i have an input as c1:41 c2:0x0000.00046b3e I want to make output display as c1:41 c2:224062 . Basically convert first part 0x0000 (as hex) to decimal which is 0 and convert second part 0x00046b3e (as hex) to decimal which is 289598 and as such add both parts namely... (3 Replies)
Discussion started by: hare
3 Replies

3. UNIX for Dummies Questions & Answers

How to Convert Strings into Numbers under C-Shell?

I tried something like: set test3 = (4.985e-10 5.130e-10 5.486e-10 6.023e-10 7.015e-10) set test4 = (4.869e-10 5.010-10 5.363e-10 5.895e-10 6.887e-10) set test5 = $test3 - $test4 but this doesn't seem to work. And then I tried: @ test5 = $test3 - $test4 This doesn't seem to work... (8 Replies)
Discussion started by: EDALBNUG
8 Replies

4. Shell Programming and Scripting

How to convert hex numbers to decimal ?

Hi, please tell me how to convert hex number to decimal 000000E7 000000000002640D 0000000000025B16 and seconds to minutes, hours, days, months, years bytes to kbytes, mbytes , gbytes read the following examples while read a b do printf "%5d %5d\n" "0x$a" "0x$b" done < "$FILE"... (15 Replies)
Discussion started by: jack2
15 Replies

5. Shell Programming and Scripting

PERL:How to convert numeric values txt file to PACKED DECIMAL File?

Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL. Regards, Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies

6. Shell Programming and Scripting

the smallest number from 90% of highest numbers from all numbers in file

Hello All, I am having problem to find what is the smallest number from 90% of highest numbers from all numbers in file. I am having file with thousands of lines and hundreds of columns. I am familiar mainly with bash but I am open to whatever suggestion witch will lead to the solutions. If I... (11 Replies)
Discussion started by: Apfik
11 Replies

7. Shell Programming and Scripting

Compare values of hashes of hash for n number of hash in perl without sorting.

Hi, I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all . my %result ( $abc => { 'data_count' => '10', 'ID' => 'ABC122', } $def => { 'data_count' => '20', 'ID' => 'defASe', ... (1 Reply)
Discussion started by: asak
1 Replies

8. Shell Programming and Scripting

Convert Column Values to a Range of Values

I have a list of columns with values that I need to transform into a row containing the range of each column. For example: "Column A" 1 2 3 4 10 12 14 15 16 17 18 "Column B" 1 4 5 6 (4 Replies)
Discussion started by: newbio
4 Replies

9. UNIX for Beginners Questions & Answers

Convert ascii character values to number that comes between the numbers in UNIX

I have variable that contains multiple values of number and also include overpunch(i.e. # $ % etc) character so we want to replace it with numbers. here are the example: Code: 11500#.0# 28575$.5$ 527#.7# 42".2" 2794 .4 2279!.9! 1067&.7& 926#.6# 2279!.9! 885".5" 11714$.4$ 27361'.1'... (1 Reply)
Discussion started by: nadeemrafikhan
1 Replies

10. Shell Programming and Scripting

Convert list of numbers to text range

Hi, I'd like to take a list of numbers (with a prefix) and convert to a range, for example: cn001 cn004 cn016 cn017 cn018 cn019 cn020 cn021 cn031 cn032 cn038 cn042 cn043 cn044 cn045 (5 Replies)
Discussion started by: chrissycc
5 Replies
MKLOCALE(1)						    BSD General Commands Manual 					       MKLOCALE(1)

NAME
mklocale -- make LC_CTYPE locale files SYNOPSIS
mklocale [-d] < src-file > language/LC_CTYPE mklocale [-d] -o language/LC_CTYPE src-file DESCRIPTION
The mklocale utility reads a LC_CTYPE source file from standard input and produces a LC_CTYPE binary file on standard output suitable for placement in /usr/share/locale/language/LC_CTYPE. The format of src-file is quite simple. It consists of a series of lines which start with a keyword and have associated data following. C style comments are used to place comments in the file. Following options are available: -d Turns on debugging messages. -o Specify output file. Besides the keywords which will be listed below, the following are valid tokens in src-file: RUNE A RUNE may be any of the following: 'x' The ASCII character x. 'x' The ANSI C character x where x is one of a, , f, , , , or v. 0x[0-9a-z]* A hexadecimal number representing a rune code. 0[0-7]* An octal number representing a rune code. [1-9][0-9]* A decimal number representing a rune code. STRING A string enclosed in double quotes ("). THRU Either ... or -. Used to indicate ranges. literal The follow characters are taken literally: <([ Used to start a mapping. All are equivalent. >)] Used to end a mapping. All are equivalent. : Used as a delimiter in mappings. Key words which should only appear once are: ENCODING Followed by a STRING which indicates the encoding mechanism to be used for this locale. The current encodings are: BIG5 The ``Big5'' encoding of Chinese. EUC EUC encoding as used by several vendors of UNIX systems. MSKanji The method of encoding Japanese used by Microsoft, loosely based on JIS. Also known as ``Shift JIS'' and ``SJIS''. NONE No translation and the default. UTF2 (deprecated) ``Universal character set Transformation Format'' adopted from Plan 9 from Bell Labs. UTF-8 The UTF-8 transformation format of ISO 10646 as defined by RFC 2279. VARIABLE This keyword must be followed by a single tab or space character, after which encoding specific data is placed. Currently only the EUC encoding requires variable data. See euc(4) for further details. INVALID (deprecated) A single RUNE follows and is used as the invalid rune for this locale. The following keywords may appear multiple times and have the following format for data: <RUNE1 RUNE2> RUNE1 is mapped to RUNE2. <RUNE1 THRU RUNEn: RUNE2> Runes RUNE1 through RUNEn are mapped to RUNE2 through RUNE2 + n-1. MAPLOWER Defines the tolower mappings. RUNE2 is the lower case representation of RUNE1. MAPUPPER Defines the toupper mappings. RUNE2 is the upper case representation of RUNE1. TODIGIT Defines a map from runes to their digit value. RUNE2 is the integer value represented by RUNE1. For example, the ASCII charac- ter '0' would map to the decimal value 0. Only values up to 255 are allowed. The following keywords may appear multiple times and have the following format for data: RUNE This rune has the property defined by the keyword. RUNE1 THRU RUNEn All the runes between and including RUNE1 and RUNEn have the property defined by the keyword. ALPHA Defines runes which are alphabetic, printable and graphic. CONTROL Defines runes which are control characters. DIGIT Defines runes which are decimal digits, printable and graphic. GRAPH Defines runes which are graphic and printable. LOWER Defines runes which are lower case, printable and graphic. PUNCT Defines runes which are punctuation, printable and graphic. SPACE Defines runes which are spaces. UPPER Defines runes which are upper case, printable and graphic. XDIGIT Defines runes which are hexadecimal digits, printable and graphic. BLANK Defines runes which are blank. PRINT Defines runes which are printable. IDEOGRAM Defines runes which are ideograms, printable and graphic. SPECIAL Defines runes which are special characters, printable and graphic. PHONOGRAM Defines runes which are phonograms, printable and graphic. SWIDTH0 Defines runes with display width 0. SWIDTH1 Defines runes with display width 1. SWIDTH2 Defines runes with display width 2. SWIDTH3 Defines runes with display width 3. If no display width explicitly defined, width 1 assumed for printable runes by default. SEE ALSO
colldef(1), mbrune(3), rune(3), setlocale(3), wcwidth(3), euc(4), utf2(4), utf8(5) BUGS
The mklocale utility is overly simplistic. HISTORY
The mklocale utility first appeared in 4.4BSD. BSD
October 14, 2002 BSD
All times are GMT -4. The time now is 02:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy