03-21-2019
@jim mcnamara & @nezabudka: Out of sheer curiosity - how did you derive those numbers? For me, the ASCII alphabet has 26 characters; upper case and lower case plus 10 digits makes that 62. 62^12=3,23e+21 - am I wrong?
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to match an alphanumeric string like the following.
i have to do like the following.
if the input line is
the data is {clock_91b}
i have to replace that with
the string was ("clock_91b")
i tried like
$line =~ s/the data is\s+\{(+)\}/the string was \(\"$1\"\)/
which... (4 Replies)
Discussion started by: sskb
4 Replies
2. UNIX for Dummies Questions & Answers
Hi :)
I am writing a ksh
I have a string of general format
A12B3456CD78
the string is of variable length
the string always ends with numbers (here it is 78.. it can be any number of digits may be 789 or just 7)
before these ending numbers are alphabets (here it is CD can even be... (3 Replies)
Discussion started by: lakshmikanth
3 Replies
3. Shell Programming and Scripting
Hi there
With shell script I'm trying to split the string into two parts. One is alphanumeric part, the other one is a numeric part.
dummy_postcode_1 = 'SL1'
--> res_alpha = 'SL' and res_numeric = '1'
dummy_postcode_2 = 'S053'
--> res_alpha = 'S' and res_numeric = '053' ... (1 Reply)
Discussion started by: ozgurgul
1 Replies
4. Shell Programming and Scripting
Okay I will let users input spaces as well :)
I am having a mental block. I have done a couple of searches but havent found anything that I understand (the likes of :alpha: and awk).
Basically I want to give the user an option to enter some text which will go down as a field within a flat... (3 Replies)
Discussion started by: tugger
3 Replies
5. Shell Programming and Scripting
Hi guys, I'm new to this forum and I'm not a UNIX expert. I can't figure out this certain problem i'm having:
I need to sort some words, some of the words are annotations (enclosed within < and >). I need to have them sorted alphabetically with all non-alphanumeric characters up front. For... (2 Replies)
Discussion started by: fed.m.ang
2 Replies
6. Shell Programming and Scripting
Hi!
Could anyone so kindly help me a code to eliminate from a txt file, obtained by collecting and merge several web-page, every word (string) containing non alphabetical, numeric and punctuation character (i.e NON a-zA-Z0-9, underscore and punctuation mark)?
Thanks a lot for the help to... (5 Replies)
Discussion started by: mjomba
5 Replies
7. Shell Programming and Scripting
Hi All,
I am new to Unix and trying to run some scripting on a linux box. I am trying to remove the non alphanumeric characters and alpha characters from the following line.
<measResults>883250 869.898 86432.4 809875.22 804609 60023 59715 </measResults>
Desired output is:
883250... (6 Replies)
Discussion started by: jackma
6 Replies
8. Shell Programming and Scripting
Hi,
I would like to be able to parse out a substring matching a basic pattern, which is a character followed by 3 or 4 digits (for example S1234 out of a larger string). The main string would just be a filename, like Thisis__the FileName_S1234_ToParse.txt. The filename isn't fixed, but the... (2 Replies)
Discussion started by: keaneMB
2 Replies
9. Shell Programming and Scripting
Hi everyone,
I want help to insert space between digits and letters in a alphanumeric string.
INPUT
TRY234TER
PHY1TYR
EXPECTED OUTPUT
TRY 234 TER
PHY 1 TYR
The lines always begin with the letters and the alphabets will be a three letter combination before and after the number. The... (2 Replies)
Discussion started by: kaav06
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I will be having file names like below,
1420SP1.01804
1420SP1.01805D
1420SP1.01805
1420SP1.01806D
1420SP1.01806
1420SP1.01901D
1420SP1.01901
1420SP1.01902D
1420SP1.01902
1420SP1.01903D
1420SP1.01903
1420SP1.01904
1420SP1.01905
From this, I need to list file names which is... (3 Replies)
Discussion started by: Sumanthsv
3 Replies
tr(1B) SunOS/BSD Compatibility Package Commands tr(1B)
NAME
tr - translate characters
SYNOPSIS
/usr/ucb/tr [-cds] [ string1 [string2]]
DESCRIPTION
The tr utility copies the standard input to the standard output with substitution or deletion of selected characters. The arguments string1
and string2 are considered sets of characters. Any input character found in string1 is mapped into the character in the corresponding posi-
tion within string2. When string2 is short, it is padded to the length of string1 by duplicating its last character.
In either string the notation:
a-b
denotes a range of characters from a to b in increasing ASCII order. The character , followed by 1, 2 or 3 octal digits stands for the
character whose ASCII code is given by those digits. As with the shell, the escape character , followed by any other character, escapes
any special meaning for that character.
OPTIONS
Any combination of the options -c, -d, or -s may be used:
-c Complement the set of characters in string1 with respect to the universe of characters whose ASCII codes are 01 through 0377
octal.
-d Delete all input characters in string1.
-s Squeeze all strings of repeated output characters that are in string2 to single characters.
EXAMPLES
Example 1: Creating a list of all the words in a filename
The following example creates a list of all the words in filename1, one per line, in filename2, where a word is taken to be a maximal
string of alphabetics. The second string is quoted to protect `' from the shell. 012 is the ASCII code for NEWLINE.
example% tr -cs A-Za-z '