Sponsored Content
Top Forums Shell Programming and Scripting How can I add 4 lines together and then read the next 4 lines? Post 302261964 by mr_andrew on Wednesday 26th of November 2008 05:23:40 AM
Old 11-26-2008
I am sorry. I mixed it up I guess..

It works with
Code:
awk -F= 'END {
  if (t)
    print e, "Total:", t
}
/\.exe/ {
  if (t)
    print e, "Total:", t
  t = 0
  e = $0
  }
/Total/ { t += $NF }
' nisse_081121_11.log

But I do not get it working if I add the code to a script.

Last edited by radoulov; 11-26-2008 at 07:01 AM.. Reason: added code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to read lines one by one from a file

I have one file in which some commands have written line line i have to read lines from this file(file name passed as avariable) and then i have to execute these commands.. how can i do it? (5 Replies)
Discussion started by: bihani4u
5 Replies

2. UNIX for Dummies Questions & Answers

Read lines from file

i have a problem on my bourne shell script. I want to read line by line and then stop when the line does not have letters or is an empty string. But i encounter an error at "while ". The error nessage is "test.sh: test: unknown operator line". Can anyone help me on this thanks :) (2 Replies)
Discussion started by: sagolo
2 Replies

3. Shell Programming and Scripting

read some lines from file!!!

any idea please!!! I want to pick up all lines of "state" and "desc" from x files: ... # state blah blah blah blah ... .. # desc blah blah blah .... Thx Andy (7 Replies)
Discussion started by: andy2000
7 Replies

4. UNIX for Dummies Questions & Answers

How to count lines - ignoring blank lines and commented lines

What is the command to count lines in a files, but ignore blank lines and commented lines? I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end. Here is an example of what I would like my... (6 Replies)
Discussion started by: kthatch
6 Replies

5. Shell Programming and Scripting

Help!! Need script to read files and add values by lines...

Hi All, I really need your help. I am a begginner in shell script and I believe this is a very simple issue. I have in my directory, n-files, like 1.dhm, 2.dhm, 3.dhm. These files have 1 column with 1 value per line, like: 1.dhm ------ 10 20 30 40 50 2.dhm ------ 30 50 20 (3 Replies)
Discussion started by: dhuertas
3 Replies

6. Shell Programming and Scripting

How to read different lines into column

Dear experts, Need your great help ! The input file is as follows: Name: test01 Name UID: C7:9D:79:52:2A:3F:DF:11:A8:64:00:60:16:36:04:02 Shareable: YES HBA/SP Pairs: HBA UID SP Name SPPort ------- ... (9 Replies)
Discussion started by: tojzz
9 Replies

7. UNIX for Dummies Questions & Answers

When reading a csv file, counter to read 20 lines and wait for minute then read next 20 till end

Hello All, i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file. Any inputs are appreciated ... (3 Replies)
Discussion started by: victor.s
3 Replies

8. Shell Programming and Scripting

search and replace, when found, delete multiple lines, add new set of lines?

hey guys, I tried searching but most 'search and replace' questions are related to one liners. Say I have a file to be replaced that has the following: $ cat testing.txt TESTING AAA BBB CCC DDD EEE FFF GGG HHH ENDTESTING This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies

9. Shell Programming and Scripting

Extract some lines from one file and add those lines to current file

hi, i have two files. file1.sh echo "unix" echo "linux" file2.sh echo "unix linux forums" now the output i need is $./file2.sh unix linux forums (3 Replies)
Discussion started by: snreddy_gopu
3 Replies

10. Shell Programming and Scripting

Read few last lines of a file

Hi, I have a txt file in below format - START 1 2 3 4 END START 5 6 7 8 END START 9 10 END (8 Replies)
Discussion started by: bhupinder08
8 Replies
n2cp(7d)							      Devices								  n2cp(7d)

NAME
n2cp - Ultra-SPARC T2 crypto provider device driver DESCRIPTION
The n2cp device driver is a multi-threaded, loadable hardware driver supporting hardware-assisted acceleration of the following crypto- graphic operations, which are built into the Ultra-SPARC T2 CMT processor: DES: CKM_DES_CBC, CKM_DES_ECB DES3: CKM_DES3_CBC, CKM_DES3_ECB, AES: CKM_AES_CBC, CKM_AES_ECB, CKM_AES_CTR, CKM_AES_CCM, CKM_AES_GCM RC4: CKM_RC4 MD5: KM_MD5, CKM_MD5_HMAC, CKM_MD5_HMAC_GENERAL, CKM_SSL3_MD5_MAC SHA-1: CKM_SHA_1, CKM_SHA_1_HMAC, CKM_SHA_1_HMAC_GENERAL, CKM_SSL3_SHA1_MAC SHA-256:CKM_SHA256, CKM_SHA256_HMAC, CKM_SHA256_HMAC_GENERAL CONFIGURATION
You configure the n2cp driver by defining properties in the /kernel/drv/n2cp.conf which override the default settings. The following prop- erty is supported: nostats Disables the generation of statistics. The nostats property may be used to help prevent traffic analysis, how- ever, this may inhibit support personnel. CRYPTO STATISTICS
Solaris crypto drivers must implement statistics variables. The n2cp driver maintains the following statistics: cwqXstate State (online, offline, error) of respective cryptographic engine, CWQ X. cwqXsubmit Number of jobs submitted to CWQ X. cwqXqfull Number of times when submitting a job that the queue for CWQ X was full. cwqXqupdate_failure Number of submit job failures on CWQ X. des Total number of jobs submitted to device for DES operations. des3 Total number of jobs submitted to device for DES3 operations. aes Total number of jobs submitted to device for AES operations. md5 Total number of jobs submitted to device for MD5 operations. sha1 Total number of jobs submitted to device for SHA-1 operations. sha256 Total number of jobs submitted to device for SHA-256 operations. md5hmac Total number of jobs submitted to device for HMAC_MD5 operations. sha1hmac Total number of jobs submitted to device for HMAC_SHA-1 operations. sha256hmac Total number of jobs submitted to device for HMAC_SHA-256 operations. ssl3md5mac Total number of jobs submitted to device for SSL3_MAC_MD5 operations. ssl3sha1mac Total number of jobs submitted to device for SSL3_MAC_SHA-1 operations. ssl3sha256mac Total number of jobs submitted to device for SSL3_MAC_SHA-256 operations. Note - Additional statistics targeted for Sun support personnel are not documented in this manpage. FILES
/kernel/drv/sparcv9/n2cp 64-bit ELF kernel driver. /platform/sun4v/kernel/drv/n2cp.conf Configuration file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC | +-----------------------------+-----------------------------+ |Availability |SUNWn2cp.v | +-----------------------------+-----------------------------+ |Interface stability |Unstable | +-----------------------------+-----------------------------+ SEE ALSO
elfsign(1), cryptoadm(1M), kstat(1M), libpkcs11(3LIB), printers.conf(4), pkcs11_kernel(5), attributes(5) Solaris Cryptographic Framework - Solaris Software Developer Collection Solaris Security for Developer's Guide - Solaris Software Developer Collection SunOS 5.11 13 Jan 2009 n2cp(7d)
All times are GMT -4. The time now is 08:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy