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 HPUX
fnmatch
fnmatch(3C)fnmatch(3C)NAME
fnmatch() - match filename patterns
SYNOPSIS DESCRIPTION
performs pattern matching as described in regexp(5) under By default, the rule qualifications for filename expansion do not apply; i.e.,
periods (dots) and slashes are matched as ordinary characters. This default behavior can be modified by using the flags described below.
The flag argument modifies the interpretation of pattern and string. If which is defined in is set in flag, a slash character in string
must be explicitly matched by a slash in pattern; it cannot be matched by either the asterisk or question mark special characters or by a
bracket expression.
If is set in flag, a leading period must be explicitly matched. It will not be matched by a bracket expression, question mark or asterisk.
By default, a period is leading if it is the first character in string. If is set in flag, a period is leading if it is the first charac-
ter in string or immediately follows a slash.
If is not set in flag, a backslash character in pattern followed by any other character matches that second character in string. In par-
ticular, matches a backslash in string. If is set, a backslash character is treated as an ordinary character.
If flag is zero, the slash character and the period are treated as regular characters. If flag has any other value, the result is unde-
fined.
RETURN VALUE
If string matches the pattern specified by pattern, returns zero. Otherwise, returns non-zero.
EXAMPLE
The following excerpt uses to check each file in a directory against the pattern
pattern = "*.c";
while(dp = readdir(dirp)){
if((fnmatch(pattern, dp->d_name,0)) == 0){
/* do processing for match */
...
}
}
AUTHOR
was developed by OSF and HP.
SEE ALSO sh(1), glob(3C), thread_safety(5).
STANDARDS CONFORMANCE fnmatch(3C)