actually there are n number of lines int he file so some have that string and some doesnt have it .... I need to find out lines based on pattern match and based on that have to do another string operation which macth the pattern ...
Hi all, I need to category the processes in my system with awk. And for now, there are several command with similar name, so i have to match more than one pattern to pick it out. for instance:
binrundb
the string1, 2 & 3 may contain word, number, blank or "/". The "bin" should be ahead "rundb"... (5 Replies)
Am trying to remove urls from text strings in PERL. I have the following but it does not seem to work:
$remarks =~ s/www\.\s+\.com//gi;
In English, I want to look for www. then I want to delete the www. and everything after it until I hit a space (but not including the space).
It's not... (2 Replies)
hi guys,
insert into /*<new>*/abc_db.tbl_name
this is should be replaced to
insert into /*<new>*/${new}.tbl_name
it should use '.' as delimiter and replace
is there any way to do it using sed (6 Replies)
Hello, i am splitting files and sometimes the string of the pattern doesnt exist in the input file it starts for example with 00:00:01. So the output is completely desorganized, is there any way of putting a replacement string in the pattern so it will grab all the times from 00:**:** to first... (0 Replies)
Hello
i have go the following result from performing 2 testing using the same file.
I have used unix script to extract the result because the files are many as shown below.
01_gravity.f.tcov 7 3 42.86
02_gravity.f.tcov 9 4 80.86... (4 Replies)
I have a log file that display the serial output coming from different places. Sometime the string in search gets clobbered with the other strings and consequently change form. For example:
serial ouput:
--------------
hello world!
done with network
configuring asic registers
comJan 1... (2 Replies)
I am trying to break a string into separate fields and print the field that matches a pattern. I am using awk at the moment and have gotten this far:
awk '{for(i=1;i<=NF;++i)print "\t" $i}' longstring
This breaks the string into fields and prints each field on a separate line.
I want to add... (2 Replies)
Hi,
I have long string in 2nd field, as shown below:
REF1 | CLESCLJSCSHSCSMSCSNSCSRSCUDSCUFSCU7SCV1SCWPSCXGPDBACAPA0DHDPDMESED6
REF2 | SBR4PCBFPCDRSCSCG3SCHEBSCKNSCKPSCLLSCMCZXTNPCVFPCV6P4KL0DMDSDSASEWG
I have a group of fixed patterns which can occur in these long strings & only... (11 Replies)
Hi Experts,
I am finding difficulty to get exact match:
file
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1
INTERFACE_NAME="lan3"
IP_ADDRESS="10.53.52.241"
SUBNET_MASK="255.255.255.192"
BROADCAST_ADDRESS=""
INTERFACE_STATE=""
DHCP_ENABLE=0
INTERFACE_NAME="lan3:1"... (6 Replies)
Discussion started by: rveri
6 Replies
LEARN ABOUT DEBIAN
qsexec
QSEXEC(1) qsexec man page QSEXEC(1)NAME
qsexec - parses the data received via stdin and executes the defined command on a pattern match.
SYNOPSIS
qsexec -e <pattern> [-t <number>:<sec>] [-c <pattern> [<command string>]] [-p] [-u <user>] <command string>
DESCRIPTION
qsexec reads log lines from stdin and searches for the defined pattern. It executes the defined command string on pattern match.
OPTIONS -e <pattern>
Specifes the search pattern causing an event which shall trigger the command.
-t <number>:<sec>
Defines the number of pattern match within the the defined number of seconds in order to trigger the command execution. By default,
every pattern match causes a command execution.
-c <pattern> [<command string>]
Pattern which clears the event counter. Executes optionally a command if an event command has been executed before.
-p Writes data also to stdout (for piped logging).
-u <name>
Become another user, e.g. www-data.
<command string>
Defines the event command string where $0-$9 are substituted by the submatches of the regular expression.
EXAMPLE
Executes the deny.sh script providing the IP address of the client causing a mod_qos(031) messages whenever the log message appears 10
times within at most one minute:
ErrorLog "|qsexec -e 'mod_qos(031).*, c=([0-9.]*)' -t 10:60 '/bin/deny.sh $1'"
SEE ALSO qsfilter2(1), qsgeo(1), qsgrep(1), qslog(1), qslogger(1), qspng(1), qsrotate(1), qssign(1), qstail(1)AUTHOR
Pascal Buchbinder, http://opensource.adnovum.ch/mod_qos/
mod_qos utilities 10.8 June 2012 QSEXEC(1)