Hello,
I have thousand of messages (HL7), I want to use awk to extract only the ones that have a particular value in pv1.18
Each record in the file is the whole HL7 message, ie. when I print $0 I get the whole message MSH EVN PID etc. ,there is an x0d between the segments.
I would like to use a line somewhat like:
to get the records out in file out that only have a pv1.18 of X.
I do not seeem to get this working, I am sure I need to correct my regexp.
Anybody please help!
Thanks.
I got moving on this, this grep works :
yet this awk does not:
Can anyone suggest what to do ?
Thanks!
---------- Post updated at 07:26 AM ---------- Previous update was at 07:04 AM ----------
Quote:
Originally Posted by gio001
I have this working with grep
Dosn't work properly for me:
Something like this seems right for grep:
Awk turns out to be pretty similar, note some awks (GNU) require --posix others don't
Need your help in creating regular expression for particular set. let say I have given two dates 20130623 to 20140625.
I need to create regular for the dates which fall in between above two dates. (4 Replies)
I want to make a REG Expression to validate the directory.
my dirsample is below:
/abc/abc/abc
abc/abc/abc
abc/abc/abc/
/abc/a bc/abc
/a bc/abc/abc
/abc/abc/a bc
/ abc/abc/abc
/abc/ abc/abc
/abc/.abc
/.abc/abc
/
//
/abc
/.abc
And my code is below:
grep -E '^\/(+\/?)+$' dirsample (4 Replies)
how to uniquely match each of the words seperated by / in perl
${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt
https://www.unix.com/images/misc/progress.gif (5 Replies)
./GEN_SCR.pl -f ${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt -o ${REP_PATH}/FUNCTIONAL/GEN2_wide1c_1.0V_max.csv
where GEN_SCR.pl is as below...i need to check whether max or min is coming in the argument to the script ...how to do this?
${REP_PATH}/FUNCTIONAL/wide1c_1.0V/max/qor.rpt ... (0 Replies)
Please let me understand this reg expression
(\s+')(.*)('\s+)(.)(.*)(\/.*)/)
i have doubt in the below 2.I'm not understanding why back-tick used?
(\s+') and ('\s+) (2 Replies)
Hello together,
Yesterday I have recieved the script in the forum which works well.
This script should insert in the previous line, the line that starts with ";".
I'd like this process to recur after any arbitrary sign unless there's a number as a sign at the beginning of a line.
Actual... (14 Replies)
HI
system.sysUpTime.0 : Timeticks: (1519411311) 175 days, 20:35:13.11
From the above output i need only 175days in a perl script..
Please Help (2 Replies)
I have regular expression like this ( replace + with \+)
($mod_server) = ($server =~ /\+/\\+/g);
the above is failing with error . what's wrong with it .
Thanks (1 Reply)
I need help with this:
Can any one tell me what does these below mean:
1. "\(.\).*") != '/'
2. sed 's+^\./++;s+/.*++'
3. sed "s+${f}/+ +
Thanks in advance (7 Replies)
Hi all,
I have a shell variable $test1 that holds a value derived from some other processing. What I need to do is use that $test1 as the input to a awk regular expression:
nawk -F"," -v tester=$test1 '
/tester/{
print $0
}
' $inputFile
So what I have is tester... (6 Replies)