Hi,
Suppose I have a file as below and I just want the field Invoice Number from this file , How can I do it.
/home/arbor>cat PH0034090202314800030IM-001
0Yp825XMilperra NSW 1891 189110H14V1Sp2871Yp300X Customer Service : 0000-368-81118H6.5V0Sp3130Yp50X ... (7 Replies)
i have a ksh script :
#!/bin/ksh
TZ=`date +%Z`+24 ;a=`date +%Y-%m-%d`
b=`date +"%H:%M:%S"`
cd /ednadtu3/u01/pipe/logs
for i in Archiver1.log
do
cat $i | grep $a | grep $b >> /ednadtu3/u01/pipe/naveed/Insert_Date.txt
done... (4 Replies)
The crisis is over. I am just doing postmortem on how we handled it. So this is just an exercise in academics.
We have a mission critical system running on RED Hat Linux. It is a turnkey system "managed 100% by the vendor". I put this is quotes because we had an event last night that... (0 Replies)
I have this line
BTSRTRGRP-448-1-1 10.162.141.118/255.255.255.254 -
I need to print only the IPADDRESS and not the subnet mask. If i use cut -c30-43 I get the ipaddress, where as in some cases if the last octet is of single digit (10.162.141.8/255.255.255.254) it... (2 Replies)
I know you could use the grep "something" -A200 flag to get all the lines past your pattern. Is there a way to get all the lines in between two patterns? The -a flag will not work since all lines in between the two patterns don't have a constant number. (4 Replies)
Hi,
i have to find a string in a file and positin of the string in the file would come in some particular interval.
let's say file is 1-1000 lines and string is in from 200-300line.
could any one suggest me how to get make the grep search for the string in that particular portion of the... (4 Replies)
Hi
When I run this command:
lsuser -a auditclasses ALL
I got:
user1 auditclasses=general,objects,cron,files,rbac,audit,lvm,aixpert
user2 auditclasses=general,objects,cron,files,rbac,audit,lvm,aixpert
user3 auditclasses=general,objects,cron,files,rbac,audit,lvm,aixpert
user4... (7 Replies)
I'm trying to add citations to this latex formatted paper. I know the bibtex file is causing the issue. I will try to use this document as a reference once I have a working version. If anyone has an idea what these errors could mean that would help immensely. Any ideas how to fix would also be... (0 Replies)
Discussion started by: D2K
0 Replies
LEARN ABOUT BSD
regex
REGEX(3) Library Functions Manual REGEX(3)NAME
re_comp, re_exec - regular expression handler
SYNOPSIS
char *re_comp(s)
char *s;
re_exec(s)
char *s;
DESCRIPTION
Re_comp compiles a string into an internal form suitable for pattern matching. Re_exec checks the argument string against the last string
passed to re_comp.
Re_comp returns 0 if the string s was compiled successfully; otherwise a string containing an error message is returned. If re_comp is
passed 0 or a null string, it returns without changing the currently compiled regular expression.
Re_exec returns 1 if the string s matches the last compiled regular expression, 0 if the string s failed to match the last compiled regular
expression, and -1 if the compiled regular expression was invalid (indicating an internal error).
The strings passed to both re_comp and re_exec may have trailing or embedded newline characters; they are terminated by nulls. The regular
expressions recognized are described in the manual entry for ed(1), given the above difference.
SEE ALSO ed(1), ex(1), egrep(1), fgrep(1), grep(1)DIAGNOSTICS
Re_exec returns -1 for an internal error.
Re_comp returns one of the following strings if an error occurs:
No previous regular expression,
Regular expression too long,
unmatched (,
missing ],
too many () pairs,
unmatched ).
3rd Berkeley Distribution May 15, 1985 REGEX(3)