Hello,
Below is my input file's content ( in HP-UX platform ):
ABCD120672-B21 1
ABCD142257-002 1
ABCD142257-003 1
ABCD142257-006 1
From the above, I just want to get the field of 13 characters that comes after 'ABCD' i.e '120672-B21'... . Could... (2 Replies)
Hi All,
I am a newbie to Shell Scripting.
I have a File
The Server Name
XXX002
-------------------------
2.1 LAPD
Iface Id Link MTU Side
ecc_3_1 4 Up 512 User
ecc_3_2 5 Up 512 User
The Server Name
XXX003
-------------------------
2.1 LAPD (4 Replies)
hi,
is it possible to find the number of occurences of a pattern between two paranthesis.
for e.g
i have a file as below.
>>{
>>hi
>>GoodMorning
>>how are you?
>>}
>>is it good,
>>tell me yes, if it is good
In the above file, its clear the occurence of word "Good"... (17 Replies)
Hi,
I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses.
My Source file
<Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT ... (3 Replies)
Hi
I want to search for a specific pattern in file
Say
ABC;HELLO_UNIX_WORLD;PQR
ABC;HELLO_UNIX_WORLD_IS_NOT_ENOUGH;XYZ
ABC;HELLO_UNIX_FORUM;LMN
Pattern to search is : "HELLO_UNIX_*****" and not "HELLO_UNIX_***_***_"
I mean after "HELLO_UNIX" there can only be one word.In this case... (2 Replies)
Hello everyone,
I am on AIX (6.1). I can only use shell (ksh) script.
I can't do this on my own, so will do my best to explain my needs.I also do not know what is the best idea to make it work, so here is what I am thinking, but I may wrong.
I need help to extract info on... (3 Replies)
I have a file like this
-------------------------------
--------------------------------------
I need a way to find the timestamp preceding the ERR-XXXXX
Here XXXX deonoes any any numeric string 00000-99999
that is a output like this
2012-11-12 : 11:59-ERR-XXXXX
2012-11-12 : ... (4 Replies)
Hi
This is my first post and I'm just a beginner. So please be nice to me.
I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file?
I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies
10. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
LEARN ABOUT DEBIAN
shellexp
SHELLEXP(3) Library Functions Manual SHELLEXP(3)NAME
shellexp - match string against a cruft filter pattern
SYNOPSIS
extern int shellexp(const char *string, const char *pattern);
DESCRIPTION
The shellexp() function is similar to fnmatch(3), but works with cruft patterns instead of standard glob(7) patterns. The function returns
a true value if string matches the cruft pattern pattern, and a false value (0) otherwise. Returns -1 in case of pattern syntax error.
Cruft patterns are similar to glob(7) patterns, but are not fully compatible. The following special characters are supported:
? (a question mark)
matches exacly one character of string other than a slash.
* matches zero or more characters of string other than a slash.
/** or /**/
matches zero or more path components in string. Please note that you can only use ** when directly following a slash, and further-
more, only when either directly preceding a slash or at the very end of pattern. A ** followed by anything other than a slash makes
pattern invalid. A ** following anything else than a slash reduces it to having the same effect as *.
[character-class]
Matches any character between the brackets exactly once. Named character classes are NOT supported. If the first character of the
class is ! or ^, then the meaning is inverted (matches any character NOT listed between the brackets). If you want to specify a
literal closing bracket in the class, then specify it as the first (or second, if you want to negate) character after the opening
bracket. Also, simple ASCII-order ranges are supported using a dash character (see examples section).
Any other character matches itself.
EXAMPLES
/a/b*/*c
matches /a/b/xyz.c, as well as /a/bcd/.c, but not /a/b/c/d.c.
/a/**/*.c
matches all of the following: /a/a.c, /a/b/a.c, /a/b/c/a.c and /a/b/c/d/a.c.
/a/[0-9][^0-9]*
matches /a/1abc, but not /a/12bc.
BUGS
Uses constant-length 1000 byte buffers to hold filenames. Also uses recursive function calls, which are not very efficient. Does not vali-
date the pattern before matching, so any pattern errors (unbalanced brackets or misplaced **) are only reported when and if the matching
algorithm reaches them.
SEE ALSO fnmatch(3), glob(3), cruft(8) and dash-search(1).
AUTHOR
This manual page was written by Marcin Owsiany <porridge@debian.org>, for the Debian GNU/Linux system (but may be used by others).
October 17, 2007 SHELLEXP(3)