Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
I do a lot of command line scripting to capture data from files or other command output. I've checked in a number of Unix and scripting books but for the life of me I can't find out how to asign field data from nawk output into variables that I can manipulate later. For example, reading a two... (6 Replies)
What am I doing wrong? I was searching for the answer to assigning variables from output. I found this simple response
ls -l apply_want.m | read perms links owner group size mtime1 mtime2 mtime3 file
this should allow me to echo the variables
echo "$perms | $links | $owner | $group |... (2 Replies)
If I have 3 variables and I want to check if any of these is null. If one of them is null then it should be assigned a value of 0.I have the following code below.
The output should be 0 is A, 11 is B, 33 is C
$a=
$b=11
$c=33
$echo $a $b $c
$11 33
for i in "${a}" "${b}" "${c}";
do
... (2 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
Hi All,
I have a fixed-width datafile from which i need to extract value/string starting from some position to the specified length in each of the lines.
awk '{print substr($0,x,y)}' datafile --- is working fine
but
awk 'BEGIN{a=0}{a=substr($0,x,y);print $a}' datafile ---is giving... (3 Replies)
Hi Everyone,
I have a flatfile "inbox.txt" which contains some information:
Location 0, folder "Inbox", SIM memory, Inbox folder
SMS message
SMSC number : "+24800000023"
Sent : Sat 04 Aug 2012 09:01:00 PM +0700
Coding : Default GSM alphabet... (5 Replies)
Hi All,
Is it possible to grep for two files and assign their names to two separate variables with for loop? I am doing the below currently:
if
then
for fname in $( cd $dirA ; ls -tr | grep "^Ucountry_file$")
do
InFile=$dirA/$fname
... (4 Replies)
Discussion started by: swasid
4 Replies
LEARN ABOUT SUSE
recvstats
RECVSTATS(8C)RECVSTATS(8C)NAME
recvstats - summarize HylaFAX receive accounting information
SYNOPSIS
/usr/sbin/recvstats [ options ] [ files ]
DESCRIPTION
recvstats is a command script that prints a summary of the HylaFAX accounting statistics for received facsimile. The statistics can be
sorted using one of several keys: the caller's CSI (default), CIDName (CallID2), CIDNumber (CallID1), the communication speed, or the com-
munication data format. Statistics are read from the file /var/spool/fax/etc/xferfaxlog unless filenames are specified on the command
line.
The following table is an example of the output from recvstats (using the default sort key):
Sender CIDName CIDNumber Pages Time Pg/min Errs TypRate TypData
61 30:47 2.0 16 9600 1-DMR
+13037904674 5 1:34 3.2 2 9600 1-DMH
+14159657824 1 1:00 1.0 0 9600 1-DMH
+15086636852 2 0:00 2.0 0 9600 1-DMH
+15105268781 740 5:47:51 2.1 59 9600 1-DMH
+15105287164 20 7:00 2.9 0 9600 1-DMH
+15123713545 3 1:19 2.3 0 9600 1-DMH
+15123713641 5 1:04 4.6 0 9600 1-DMH
+16099211926 3 2:00 1.5 0 9600 1-DMH
+17088987617 1 0:18 3.3 0 9600 1-DMH
415 390 6175 22 6:01 3.6 0 9600 1-DMH
415 965 7651 56 34:52 1.6 14 9600 1-DMH
415 973 6723 1 2:09 0.5 0 9600 2-DMR
49 211 161514 1 0:00 1.0 0 9600 2-DMR
8185970503 1 0:28 2.1 0 9600 2-DMR
ALDUS CORPORATION ALDUS CO 5551212 3 2:34 1.2 0 9600 1-DMH
--------------------------------------------------------------------------------------------------
Total 925 7:19:03 2.1 91
The Sender column shows the caller's TSI (notice that some callers have not setup a TSI). The CIDName column is the received CIDName value
for the sender. The CIDNumber column is the received CIDNumber value for the sender. The Pages column is the total number of good pages
received. The time column shows the total amount of time spent receiving facsimile from a sender. The Pg/min column displays the average
transfer rate. The Errs column indicates how many protocol errors were encountered while receiving facsimile. The TypRate column displays
the most common communication speed with which facsimile were received. The TypData column shows the most common data format in which fac-
simile data were received.
OPTIONS -age days Show information only for the facsimile received in the last specified number of days.
-csi* Sort output by caller's CSI.
-cidname Sort output by CIDName
-cidnumber Sort output by CIDNumber
-format Sort output by data format.
-send* Sort output by sender (i.e. caller's CSI).
-speed Sort output by signalling rate.
-since time Show information only for the facsimile received 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 received before the specified time; where time is of the same form as since.
FILES
/var/spool/fax spooling area
/var/spool/fax/etc/xferfaxlog default file from which to read statistics
SEE ALSO faxq(8C), xferfaxstats(8C), hylafax-log(5F)
March 3, 1995 RECVSTATS(8C)