The position of "qrt", "xyz" and "abc" would change. It can be in any order.
if the input is
then the output should be null, as I want the comparison of the value in the bracket of only xyz and abz. and print qrt only if it is the same.
In your example the values in the brackets of xyz and abz are not equal so, it should not return anything
if the input is
then the output should be qrt:[2312]. As the values int he brackets of abz is equal to the value in the brackets of xyz.
The strings "xyz:", "abz:" and "qrt:" always remain the same only the values in the bracket keep changing.
I hope this makes it more clear.
Thanks
Last edited by Scrutinizer; 03-01-2013 at 06:53 AM..
Reason: code tags
Hi
I have a file (say 'file1')and I want to search for a first occurence of pattern (say 'ERROR') and print ten lines in the file below pattern. I have to code it in PERL and I am using Solaris 5.9.
I appreciate any help with code
Thanks
Ammu (6 Replies)
Hi,
I know how to use awk to search some expressions like five consecutive numbers, , this is easy.
However, how do I make awk print the pattern that is been matched?
For example:
input: usa,canada99292,japan222,france59664,egypt223
output:99292,59664 (6 Replies)
Hi,
I am writing a shell script to parse some files, and gather data.
The data in the files is displayed as below.
.......xyz: abz: ......qrt: ....
.......xyz: abz: ......qrt: ...
I have tried using awk and cut, but the position of these values keep changing, so I wasn't able to get... (2 Replies)
Hi experts , im new to Unix,AWK ,and im just not able to get this right.
I need to match for some patterns if it matches I need to print the next few words to it.. I have only three such conditions to match… But I need to print only those words that comes after satisfying the first condition..... (2 Replies)
I have
2013-06-11 23:55:14 1Umexd-0004cm-IG <= user@domain.com
I need sed/awk operation on this, so that it should print the very next pattern only after the the pattern mach <=
ie only print user@domain.com (7 Replies)
Hi,
I want to print the lines from file1 which has the matching pattern from file2 in linux.
file1 data is below
-----------------
CACA|1234
CA|2345
file2 data is below
-----------------
CA
NC
TX
Now I want to print the lines from file1 for the values present in file2.
... (5 Replies)
Hello Experts , require help . See below output:
File inputs
------------------------------------------
Server Host = mike
id rl images allocated last updated density
vimages expiration last read <------- STATUS ------->... (4 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Discussion started by: Klasform
9 Replies
LEARN ABOUT DEBIAN
readproctitle
readproctitle(8) System Manager's Manual readproctitle(8)NAME
readproctitle - maintains an automatically rotated log in memory for inspection by ps(1).
readproctitle is available in daemontools 0.75 and above.
SYNOPSIS
readproctitle L D
DESCRIPTION
L consists of any number of arguments. D is one argument consisting of at least five dots.
readproctitle reads data into the end of D, shifting D to the left to make room. This means that the most recent data is visible to
process-listing tools such as ps(1). readproctitle always leaves three dots at the left of D.
For example, if
readproctitle io errors: ....................
reads the data
fatal error xyz
warning abc
then its command-line arguments change to
readproctitle io errors: ... xyz!warning abc!
with a newline character in place of each !. Process-listing tools typically show the newline character as ? or
.
readproctitle exits when it reaches the end of input.
Beware that most implementations of ps(1) have small argument-length limits. These limits apply to the total length of readproctitle L D.
I have not seen a system with a limit below 512 bytes.
SEE ALSO supervise(8), svc(8), svok(8), svstat(8), svscanboot(8), svscan(8), fghack(8), pgrphack(8), multilog(8), tai64n(8), tai64nlocal(8), setu-
idgid(8), envuidgid(8), envdir(8), softlimit(8), setlock(8), ps(1)
http://cr.yp.to/daemontools.html
http://cr.yp.to/slashcommand.html
readproctitle(8)