I had different problem scenarios with IF statement. Can any expert please enlighten me on the difference with these scenarios. Thank you.
1st Scenario:
testdate=`date +%Y%m`
test=`cat /var/log/database0.$testdate*.log | grep "Errors found during processing" | tail -10`
if
then
... (4 Replies)
New to scripting in general, so patience plz. If I ask a stupid question or don't get it, I thank you for your kindness in advance.
That said, did a for i loops checks to see if a PB* file is there but I need to know two things before I copy the file.
I need to know if the file's create date... (2 Replies)
I am kind of new in Unix and i have to make a menu. I want to put an if statement in the menu. you should enter the filename and it goes to that file. How do i do this? (1 Reply)
HI Unix Gurus,
I have a number of SELECT count(*) statements in an input file and I want to execute it using a shell script but one by one using loop in script....
How can I do this..... (7 Replies)
1. The problem statement, all variables and given/known data:
Two problems I need solving please. I created a script where the user types in 7 numbers as standard input and each one is then stored in an array. Now I need to perform the following calculations on those numbers:
1) Use a while... (11 Replies)
Hello. I am new here and new to scripting. I used to have a very basic script that worked for simple backup/restore of files. I have expanded it and well... I have ended up with a complete mess. It still backs up and restores but there is so many issues that stem from the many if statements I... (3 Replies)
Bash shell, variables i and rem are working fine in 2 separate for loops, but I'd like to consolidate them like this:
for && This gives syntax error on &&.
Thanks in advance for direction. (5 Replies)
Say I have a for loop that parse through a file....Say it look for the colors red and blue in sections of the file. Say it find red before it find blue in the file.
Say I have two if statements in the for loop
Something like if blue is found print blue is my favorite color is the first if... (7 Replies)
Discussion started by: scj2012
7 Replies
LEARN ABOUT OPENSOLARIS
csx_parse_cistpl_format
csx_Parse_CISTPL_FORMAT(9F) Kernel Functions for Drivers csx_Parse_CISTPL_FORMAT(9F)NAME
csx_Parse_CISTPL_FORMAT - parse the Data Recording Format tuple
SYNOPSIS
#include <sys/pccard.h>
int32_t csx_Parse_CISTPL_FORMAT(client_handle_t ch, tuple_t *tu,
cistpl_format_t *pt);
INTERFACE LEVEL
Solaris DDI Specific (Solaris DDI)
PARAMETERS
ch Client handle returned from csx_RegisterClient(9F).
tu Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F).
pt Pointer to a cistpl_format_t structure which contains the parsed CISTPL_FORMAT tuple information upon return from this function.
DESCRIPTION
This function parses the Data Recording Format tuple, CISTPL_FORMAT, into a form usable by PC Card drivers.
The CISTPL_FORMAT tuple indicates the data recording format for a device partition.
STRUCTURE MEMBERS
The structure members of cistpl_format_t are:
uint32_t type;
uint32_t edc_length;
uint32_t edc_type;
uint32_t offset;
uint32_t nbytes;
uint32_t dev.disk.bksize;
uint32_t dev.disk.nblocks;
uint32_t dev.disk.edcloc;
uint32_t dev.mem.flags;
uint32_t dev.mem.reserved;
caddr_t dev.mem.address;
uint32_t dev.mem.edcloc;
The fields are defined as follows:
type This field indicates the type of device:
TPLFMTTYPE_DISK disk-like device
TPLFMTTYPE_MEM memory-like device
TPLFMTTYPE_VS vendor-specific device
edc_length This field indicates the error detection code length.
edc_type This field indicates the error detection code type.
offset This field indicates the offset of the first byte of data in this partition.
nbytes This field indicates the number of bytes of data in this partition
dev.disk.bksize This field indicates the block size, for disk devices.
dev.disk.nblocks This field indicates the number of blocks, for disk devices.
dev.disk.edcloc This field indicates the location of the error detection code, for disk devices.
dev.mem.flags This field provides flags, for memory devices. Valid flags are:
TPLFMTFLAGS_ADDR address is valid
TPLFMTFLAGS_AUTO automatically map memory region
dev.mem.reserved This field is reserved.
dev.mem.address This field indicates the physical address, for memory devices.
dev.mem.edcloc This field indicates the location of the error detection code, for memory devices.
RETURN VALUES
CS_SUCCESS Successful operation.
CS_BAD_HANDLE Client handle is invalid.
CS_UNKNOWN_TUPLE Parser does not know how to parse tuple.
CS_NO_CARD No PC Card in socket.
CS_NO_CIS No Card Information Structure (CIS) on PC Card.
CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO csx_GetFirstTuple(9F), csx_GetTupleData(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 24 Jan 1997 csx_Parse_CISTPL_FORMAT(9F)