10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Im trying to search for a single variable in the first field and from that output use awk to extract out the lines that contain a value less than a value stored in another variable. Both the variables are associated with each other.
Any guidance is appreciated.
File that contains the... (6 Replies)
Discussion started by: ncwxpanther
6 Replies
2. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
3. Shell Programming and Scripting
i have this variable:
varT="1--2--3--5"
i want to use awk to print field 3 from this variable. i dont want to do the "echo $varT".
but here's my awk code:
awk -v valA="$varT" "BEGIN {print valA}"
this prints the entire line. i feel like i'm so close to getting what i want. i... (4 Replies)
Discussion started by: SkySmart
4 Replies
4. Shell Programming and Scripting
consider the script below
sh /opt/hqe/hqapi1-client-5.0.0/bin/hqapi.sh alert list --host=localhost --port=7443 --user=hqadmin --password=hqadmin --secure=true >/tmp/alerts.xml
awk -F'' '{for(i=1;i<=NF;i++){
if($i=="Alert id") {
if(id!="")
if(dt!=""){
cmd="sh someScript.sh... (2 Replies)
Discussion started by: vivek d r
2 Replies
5. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
6. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
7. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
8. Shell Programming and Scripting
I want to filter 2nd column = 2 using awk
$ cat t
1 2
2 4
$ VAR=2
#variable worked in print
$ cat t | awk -v ID=$VAR ' { print ID}'
2
2
# but variable didn't work in awk filter
$ cat t | awk -v ID=$VAR '$2~/ID/ { print $0}' (2 Replies)
Discussion started by: honglus
2 Replies
9. Shell Programming and Scripting
Hi,
I am using sed and nawk command for replace/add/remove on file records.
But when I am using the inputfile name and directing output to the same inpu name file becomes empty.
I don't want to use to copy it to another file and move it back to original file.
Example:
sed 's/./,&/17'... (2 Replies)
Discussion started by: svenkatareddy
2 Replies
10. Shell Programming and Scripting
I want to use an inputfile for a shell-script
Inputfile consists 10 lines
In the script variables have to be filled with these lines
$1 must be line 1
$2 must be line 2
and so on
How do I get this done ??? :confused: :confused: (2 Replies)
Discussion started by: cns
2 Replies
XFERFAXSTATS(8C) XFERFAXSTATS(8C)
NAME
xferfaxstats - summarize HylaFAX transmission accounting
SYNOPSIS
/usr/sbin/xferfaxstats [ options ] [ files ]
DESCRIPTION
xferfaxstats is a command script that prints a summary of the HylaFAX accounting statistics for transmitted jobs. The statistics can be
sorted using one of several keys: the sender's account name (default), the job tag (useful when used for accounting purposes), the remote
party's CSI, the called phone number, the output device used for the call, the communication speed, and the communication data format.
Statistics are read from the file /var/spool/fax/etc/xferfaxlog in the spooling area, unless filenames are specified on the command line.
The following table is an example of the output from xferfaxstats (using the default sort key):
Destination Pages Time Pg/min Errs TypRate TypData
cadsmith@esd.sgi.com 34 24:05 1.4 0 9600 1-D MH
ctb@corp.sgi.com 32 20:43 1.5 2 9600 2-D MR
edmark@esd.sgi.com 42 29:30 1.4 3 9600 1-D MH
fredc@mfg.sgi.com 157 1:37:52 1.6 0 9600 2-D MR
jlw@engr.sgi.com 81 57:29 1.4 1 9600 1-D MH
jlw@wpd.sgi.com 346 3:57:57 1.5 100 9600 1-D MH
karlton@asd.sgi.com 68 36:57 1.8 0 9600 1-D MH
kerrie@mfg.sgi.com 48 32:29 1.5 1 9600 2-D MR
kgraf@mfg.sgi.com 128 1:48:21 1.2 2 9600 1-D MH
kubey@wpd.sgi.com 264 3:22:13 1.3 6 9600 1-D MH
loki@wpd.sgi.com 205 2:56:45 1.2 5 9600 2-D MR
moondog@esd.sgi.com 112 1:23:01 1.3 4 9600 2-D MR
mpolen@mti.sgi.com 122 1:39:32 1.2 1 9600 1-D MH
nancyf@mfg.sgi.com 174 2:08:44 1.4 2 9600 2-D MR
paulh@mfg.sgi.com 56 1:29:24 0.6 0 9600 2-D MR
richardn@mfg.sgi.com 34 24:42 1.4 1 9600 1-D MH
rosa@corp.sgi.com 32 28:00 1.1 2 9600 1-D MH
sam@asd.sgi.com 65 46:25 1.4 5 9600 1-D MH
seth@asd.sgi.com 34 25:04 1.4 0 9600 1-D MH
--------------------------------------------------------------------------
Total 2034 25:49:13 1.3 135
The first column column shows the sort key value used (the sender's identity here, but otherwise the destination phone number, remote CSI,
etc.). The Pages column is the total number of good pages transmitted. The time column shows the total amount of time spent transmitting.
The Pg/min column displays the average transfer rate. The Errs column indicates how many errors were encountered while transmitting fac-
simile. (Note that this statistic does not include problems encountered while placing a call; e.g. busy signals.) The TypRate column
displays the most common communication speed with which facsimile were transmitted. The TypData column shows the most common data format
in which facsimile data were transmitted.
Account names other than ``root'' and ``guest'' can be automatically mapped to a canonical format in which the host name is removed and
identical addresses in the same domain are merged together (i.e. for NIS environments). For example, ``sam@flake.asd.sgi.com'' and
``sam@foobar.asd.sgi.com'' are both mapped to ``sam@asd.sgi.com'' with the associated statistics accumulated. Identical account names in
different domains generate a warning; e.g. ``loki@wpd.sgi.com'' and ``loki@corp.sgi.com''. The above mapping is done only if the -map
option is specified, by default account names are not altered.
OPTIONS
-age days Show information only for the facsimile transmitted in the last specified number of days.
-csi* Sort output by the remote party's CSI.
-dest* Sort output by the phone number called.
-dev* Sort output by the output device (i.e. modem) used.
-format Sort output by the negotiated data format.
-job* Sort output by client-specified job tag identifiers.
-nomap Do not perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading
hostname part of domain names are stripped. This is the default behavior.
-map Perform the account name mapping by which statistics for the ``root'' and ``guest'' accounts are merged and leading hostname
part of domain names are stripped.
-send* Sort output by sender's account name (default).
-since time Show information only for the facsimile transmitted since the specified time; where time is of the form ``MM/DD/YY HH:MM'' (the
date(1) format string %D %H:%M).
-end time Show information only for the facsimile transmitted before the specified time; where time is of the same form as since.
-speed Sort output by the signalling rate.
DIAGNOSTICS
``Warning, address clash, "%s" and "%s".'' During address mapping two mapped addresses were found for the same account name.
``Warning, weird user address/name "%s".'' During address mapping an address was encountered that multiple ``@'' symbols in it.
NOTES
The sender field does not necessarily represent the submitter's actual identity. For example, it reflects the value given by the send-
fax(8C) ``-f'' option. Be cautious that this field is not utilized for auditing if the fax user base is not trusted.
FILES
/var/spool/fax spooling area
etc/xferfaxlog default file from which to read statistics
SEE ALSO
faxq(8C), faxsend(8C), recvstats(8C), hylafax-log(5F)
May 12, 1996 XFERFAXSTATS(8C)