Hi I have fakebook.csv as following:
F1(current date) F2(popularity) F3(name of book) F4(release date of book)
2006-06-21,6860,"Harry Potter",2006-12-31
2006-06-22,,"Harry Potter",2006-12-31
2006-06-23,7120,"Harry Potter",2006-12-31
2006-06-24,,"Harry Potter",2006-12-31... (0 Replies)
Hi,
I'm new to shell programming, can anyone help me on this? I want to do following operations -
1. Average salary for each country
2. Total salary for each city
and data that looks like -
salary country city
10000 zzz BN
25000 zzz BN
30000 zzz BN
10000 yyy ZN
15000 yyy ZN
... (3 Replies)
Hi i have data with two columns like below.
I want to find average of column values like if the value in column 2 is between 0-250000 the average of column 1 is some xx and average of column2 is ww then if value is 250001-5000000 average of column 1 is yy and average of column 2 is zz.
And my... (5 Replies)
Hi,
My input file
Gene1 1
Gene1 2
Gene1 3
Gene1 0
Gene2 0
Gene2 0
Gene2 4
Gene2 8
Gene3 9
Gene3 9
Gene4 0
Condition:
If the first column matches, then look in the second column. If there is a value of zero in the second column, then don't consider that record while averaging.
... (5 Replies)
Hello dears,
I have a log file with records like below and want to get a average of one column based on the search of one specific keyword.
2015-02-07 08:15:28 10.102.51.100 10.112.55.101 "kevin.c" POST ... (2 Replies)
I have the need to match the first two columns and when they match, calculate the percent of average for the third columns. The following awk script does not give me the expected results.
awk 'NR==FNR {T=$3; next} $1,$2 in T {P=T/$3*100; printf "%s %s %.0f\n", $1, $2, (P>=0)?P:-P}' diff.file... (1 Reply)
I would like to have some help in calculating 5th percentile value of column 2 for each site, the input is like below:site val1 val2
002 10 25.3
002 20 25.3
002 30 25.3
002 40 20
002 50 20
002 60 20
002 70 20
002 80 30
002 90 30
002 100 30
002 120 30
003 20 30.3
003 20 30.3
003 30 20... (2 Replies)
Discussion started by: wuhuai
2 Replies
LEARN ABOUT XFREE86
scsi_setup_cdb
scsi_setup_cdb(9F) Kernel Functions for Drivers scsi_setup_cdb(9F)NAME
scsi_setup_cdb - setup SCSI command descriptor block (CDB)
SYNOPSIS
int scsi_setup_cdb(union scsi_cdb *cdbp, uchar_t cmd, uint_t addr, uint_t cnt, uint_t othr_cdb_data);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
cdbp Pointer to command descriptor block.
cmd The first byte of the SCSI group 0, 1, 2, 4, or 5 CDB.
addr Pointer to the location of the data.
cnt Data transfer length in units defined by the SCSI device type. For sequential devices cnt is the number of bytes. For
block devices, cnt is the number of blocks.
othr_cdb_data Additional CDB data.
DESCRIPTION
scsi_setup_cdb() function initializes a group 0, 1, 2, 4, or 5 type of command descriptor block pointed to by cdbp using cmd, addr, cnt,
othr_cdb_data.
addr should be set to 0 for commands having no addressing information (for example, group 0 READ command for sequential access devices).
othr_cdb_data should be additional CDB data for Group 4 commands; otherwise, it should be set to 0.
scsi_setup_cdb() function does not set the LUN bits in CDB[1] as the makecom(9F) functions do. Also, the fixed bit for sequential access
device commands is not set.
RETURN VALUES
scsi_setup_cdb() returns:
1 Upon success.
0 Upon failure.
CONTEXT
These functions can be called from a user or interrupt context.
SEE ALSO makecom(9F), scsi_pkt(9S)
Writing Device Drivers
American National Standard Small Computer System Interface-2 (SCSI-2)
American National Standard SCSI-3 Primary Commands (SPC)
SunOS 5.10 23 Jun 1997 scsi_setup_cdb(9F)