The use of the quantifier * is inappropriate as this pattern will match an empty string. Also, if you include the pipe in a character class like you do, that pattern will also match the character | in ab|kjlza. Better use this pattern:
Hi,
I trying to find the solution for writing the programming in unix by shell programming for sorting thr string in alphabetical order.
I getting diffculty in that ,, so i want to find out the solution for that
Please do needful
Thanks
Bhagyesh (1 Reply)
1. The problem statement, all variables and given/known data:
Find the first letter in alphabet from the input:
Accept the input of a series of upper case alphabetic letters one at a time. The input ends with a 0. Find and display the first letter in alphabetic order. For example, input... (27 Replies)
Hi everyone!
I am new to the forum and have recently started working with Linux.
Quick question, I want a user list in alphabetical order as the output of a shell script.
Who can help me!?
Thanks!
From the netherlands ;) (5 Replies)
I've looking over a script for work and I've had a problem with the script not listing the files in alphabetical order. To look up PIDs for apps, it would be beneficial to have them listed in that order. Here is what I've been reviewing.
#!/usr/bin/perl
$str = sprintf "%4s %-40s", "PID",... (7 Replies)
Hi, need help in sorting lines between strings "<section status = “ole-service”>" and "</section>" in alphabetical order, based on the text in red. Hoping for an AWK or SED solution. Thank you.
...
<section status = “ole-service”>...
<p service = "OOO">XZZ</p>
<p service = "AAA">AAA... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a shell script program to count the ONLY the number of alphabetic characters stored in the shell variable... (1 Reply)
Hi All,
I have one file containing thousands of table names in single column. Now I want that file split into multiple files e.g one file containing table names starting from A, other containing all tables starting from B...and so on..till Z.
I tried below but it did not work.
for i in... (6 Replies)
Discussion started by: shekhar_4_u
6 Replies
LEARN ABOUT CENTOS
glob_match
GLOB_MATCH(9) libata Core Internals GLOB_MATCH(9)NAME
glob_match - match a text string against a glob-style pattern
SYNOPSIS
int glob_match(const char * text, const char * pattern);
ARGUMENTS
text
the string to be examined
pattern
the glob-style pattern to be matched against
DESCRIPTION
Either/both of text and pattern can be empty strings.
Match text against a glob-style pattern, with wildcards and simple sets:
? matches any single character. * matches any run of characters. [xyz] matches a single character from the set: x, y, or z. [a-d] matches a
single character from the range: a, b, c, or d. [a-d0-9] matches a single character from either range.
The special characters ?, [, -, or *, can be matched using a set, eg. [*] Behaviour with malformed patterns is undefined, though generally
reasonable.
SAMPLE PATTERNS
"SD1?", "SD1[0-5]", "*R0", "SD*1?[012]*xx"
This function uses one level of recursion per '*' in pattern. Since it calls _nothing_ else, and has _no_ explicit local variables, this
will not cause stack problems for any reasonable use here.
RETURNS
0 on match, 1 otherwise.
AUTHOR
Jeff Garzik
Author.
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 GLOB_MATCH(9)