Dear All,
please tell me any script which can able to calculate the bus hours by claculating the volume for example
hour volume
1 100
2 200
3 300
4 7000
5 50
6 80
7 77
8 77
9 165
10 888
11 99
12 89
13 33
14 676
15 878
16 90
17 56 (14 Replies)
Hi all,
I have a flat file like
10 steven
25 mike
47 Charles
127 Nancy
34 steven
23 mike
67 Charles
7761 Nancy
8 steven
54 mike
88 Charles
1267 Nancy
I need to calculate the total of steven and all the members , for this I am using like
grep "`sed -n 1p patterns.txt`"... (7 Replies)
Hi
First field is the Record Type. A Record Type 5 can have multiple Record Type 6's before another Record Type 5 appears.
I want to calculate the total of fields at position 8-11 on Record type 6 when Record Type 5 has a field at position 11-14 equals to '2222'. then it should delete the lines... (2 Replies)
The file content is dynamic and using this format:
name1 number1
name2 number2
name3 number3
name4 number4
....................
Need a smooth way to calculate the sum of all the numbers in that file (number1 + number2 + number3 + number4........ = total ) (11 Replies)
Good afternoon! Im new at scripting and Im trying to write a script to
calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Hi,
I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files.
File structure is same on both servers and for reference as follows:
27-Aug-2010... (4 Replies)
HI
I have a file
# cat marks.txt
MARKS LIST
2013
Name english french chinese latin total_marks
wer 34 45 67 23
wqa 12 39 10 56
wsy 23 90 23 78
Now i need to find the total marks of each student using... (11 Replies)
Hi All ,
I have the following script as below , I tried to modify to meet the requirement , could someone help ? very thanks
================================================================================================
while read STR NAME; do
Total=0
MyString="$STR"
GetData () {... (18 Replies)
Hi
I am trying to calculate memory used by Linux System
free -m
total used free shared buffers cached
Mem: 32109 31010 1099 0 3600 7287
-/+ buffers/cache: 20121 11987
Swap: 10239 1282 8957
Now according to my requirement Im calculating memory using below cmd
free -m | awk 'NR==3{printf... (2 Replies)
Discussion started by: sam@sam
2 Replies
LEARN ABOUT SUNOS
logger
logger(1B) SunOS/BSD Compatibility Package Commands logger(1B)NAME
logger - add entries to the system log
SYNOPSIS
/usr/ucb/logger [-f filename] [-i] [-p priority] [-t tag] mm [message]...
DESCRIPTION
The logger utility provides a method for adding one-line entries to the system log file from the command line. One or more message argu-
ments can be given on the command line, in which case each is logged immediately. If message is unspecified, either the file indicated with
-f or the standard input is added to the log. Otherwise, a filename can be specified, in which case each line in the file is logged. If
neither is specified, logger reads and logs messages on a line-by-line basis from the standard input.
OPTIONS
The following options are supported:
-i Log the process ID of the logger process with each line.
-f filename Use the contents of filename as the message to log.
-p priority Enter the message with the specified priority. The message priority can be specified numerically, or as a facility.level
pair. For example, `-p local3.info' assigns the message priority to the info level in the local3 facility. The default pri-
ority is user.notice.
-t tag Mark each line added to the log with the specified tag.
EXAMPLES
Example 1: Logging a message
The command:
example% logger System rebooted
will log the message `System rebooted' to the facility at priority notice to be treated by syslogd as other messages to the facility notice
are.
Example 2: Logging messages from a file
The command:
example% logger -p local0.notice -t HOSTIDM -f /dev/idmc
will read from the file /dev/idmc and will log each line in that file as a message with the tag `HOSTIDM' at priority notice to be treated
by syslogd as other messages to the facility local0 are.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO syslogd(1M), syslog(3C), attributes(5)SunOS 5.10 14 Sep 1992 logger(1B)