01-19-2009
Joeyg, many thanks for your help. Just before you had posted that, I changed my script to:
if ($0 ~ /Users of SYNERGY-CMBase:/) {print}
if ($0 ~ /"SYNERGY-CMBase"/)
{
while ("x" == "x")
{
getline var
if (var ~ /floating license/) {continue}
if (var == "") { continue }
if (var !~ /Users of SYNERGY-GroupSecurity/) {print var} else {exit}
}
}
}
which gives me the output:
Users of SYNERGY-CMBase: (Total of 12 licenses issued; Total of 3 licenses in use)
ccm_root phys-agsdev /dev/pts/67 u414014 (v1.0) (Phys-agsdev/19353 2477), start Mon 1/19 13:16
ccm_root phys-agsdev /dev/pts/19 z311203 (v1.0) (Phys-agsdev/19353 1449), start Mon 1/19 13:45
ccm_root phys-agsdev /dev/pts/104 u006134 (v1.0) (Phys-agsdev/19353 2017), start Mon 1/19 15:31
I'm now going to try and insert headers for username and process ID etc.
Thanks again.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
(extract from SQL binlog file...)
# at 4960
#080801 14:35:31 server id 4 end_log_pos 195 Query thread_id=63121426 exec_time=0 error_code=0
use d_jds;
SET TIMESTAMP=1217581531;
UPDATE bid_details set bidding = 3170.37 ,deduction=if((3170.37 < 37.43),0,deduction)
where... (3 Replies)
Discussion started by: shantanuo
3 Replies
2. UNIX for Dummies Questions & Answers
hi, i wonder if someone could tell me how to properly convert the following code onto one line:
if
then
print "The file was not copied"
exit 1
fi
i am not sure how to close off the if statement here. everything i try gives me "syntax error: `if' unmatched"
if... (2 Replies)
Discussion started by: ankimo
2 Replies
3. Shell Programming and Scripting
I have script like
echo -n FINISHED FEXP: ${TABLE2EXP}
echo $STATUS
I want the output of both the echo statement in one line
How can i do this (3 Replies)
Discussion started by: scorp_rahul23
3 Replies
4. Shell Programming and Scripting
Hello Everyone,
I don't know what is wrong with this:
Is it that nawk cannot run a ".sh" script or is it not treating "." as a literal. If so how to make "." be treated as a literal in "nawk" statemnts?
Thanks in Advance (2 Replies)
Discussion started by: bhaire
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I executing a awk in a shell script. A part of AWK is:
nawk -F"¤" -v fichero=${DIRECTORIO_PARAMETROS}/${FICHERO_CONFIGURACION_CHEQUEOS} -v sistema=${SISTEMA_SEDRA} -v fichero_no_validos="No_validos_CAMPO_TIPO_${SIST}.dat" 'BEGIN{
if ( fichero != "")
{ ... (4 Replies)
Discussion started by: pepeli30
4 Replies
6. Shell Programming and Scripting
Hello,
I've written a ksh awk script to ping multiple servers and write the results to a file. That part is working ok. I then want to extract the names of only the server which are available. This is indicated by '1 packets received'. The server name actually appears above that line so I found... (4 Replies)
Discussion started by: Grueben
4 Replies
7. Shell Programming and Scripting
I have to get the count only if poc=4060 and loc=JPN ( basically I want to check both values exist then count the occurrences.)
disp0201.php?poc=4060&roc=1&ps=R&ooc=13&mjv=6&mov=5&rel=5&bod=155&oxi=2&omj=5&ozn=1&dav=20&cd=&daz=& drc=&mo=&sid=&lang=EN&loc=JPN
I have been trying like this... (2 Replies)
Discussion started by: elamurugu
2 Replies
8. Shell Programming and Scripting
Good morning,
My first time actually posting in this forum, though I have used this forum to help with numerous projects.
I am trying to figure out why my if statement does not work. I have a file where a line is inputted every 15 seconds. I want this if statement to check what the last line... (3 Replies)
Discussion started by: Shanrunt
3 Replies
9. Shell Programming and Scripting
For some reason read -e isn't working in my script. I need a directory as input from a user and I'd like for them to be able to use tab complete which is why I'm using -e. When the script is run, I get:
read: line 6: illegal option -e
In order to just figure out what is going on with the -e... (4 Replies)
Discussion started by: orangeSunshine
4 Replies
10. Shell Programming and Scripting
Hello All,
I am running source command on my project configuration file app.cfg which has conditional statements with make file systax E.g ifeq ($(APP_CMP_DIR),trunk).
When I source this file it throws error: syntax error near unexpected token... (1 Reply)
Discussion started by: anand.shah
1 Replies
XPATH(1p) User Contributed Perl Documentation XPATH(1p)
NAME
xpath - a script to query XPath statements in XML documents.
SYNOPSIS
xpath [-s suffix] [-p prefix] [-q] -e query [-e query] ... [file] ...
DESCRIPTION
xpath uses the XML::XPath perl module to make XPath queries to any XML document. The XML::XPath module aims to comply exactly to the XPath
specification at "http://www.w3.org/TR/xpath" and yet allows extensions to be added in the form of functions.
The script takes any number of XPath pointers and tries to apply them to each XML document given on the command line. If no file arguments
are given, the query is done using "STDIN" as an XML document.
When multiple queries exist, the result of the last query is used as context for the next query and only the result of the last one is
output. The context of the first query is always the root of the current document.
OPTIONS
-q
Be quiet. Output only errors (and no separator) on stderr.
-s suffix
Place "suffix" at the end of each entry. Default is a linefeed.
-p prefix
Place "prefix" preceding each entry. Default is nothing.
BUGS
The author of this man page is not very fluant in english. Please, send him (fabien@tzone.org) any corrections concerning this text.
See also XML::XPath(3pm).
SEE ALSO
XML::XPath(3pm).
HISTORY
This module is copyright 2000 Fastnet Software Ltd. This is free software, and as such comes with NO WARRANTY. No dates are used in this
module. You may distribute this module under the terms of either the Gnu GPL, or under specific licencing from Fastnet Software Ltd.
Special free licencing consideration will be given to similarly free software. Please don't flame me for this licence - I've put a lot of
hours into this code, and if someone uses my software in their product I expect them to have the courtesy to contact me first.
Full support for this module is available from Fastnet Software Ltd on a pay per incident basis. Alternatively subscribe to the Perl-XML
mailing list by mailing lyris@activestate.com with the text:
SUBSCRIBE Perl-XML
in the body of the message. There are lots of friendly people on the list, including myself, and we'll be glad to get you started.
Matt Sergeant, matt@sergeant.org
This man page was added as well as some serious modifications to the script by Fabien Ninoles <fabien@debian.org> for the Debian Project.
perl v5.10.1 2009-12-30 XPATH(1p)