Sponsored Content
Top Forums Shell Programming and Scripting is that possible to keep statements in any loop?? Post 302282136 by otheus on Friday 30th of January 2009 07:59:32 AM
Old 01-30-2009
In KSH, you can simplifier your task with the for loop:
Code:
for PARTITION in a b g ; do  
  addvol /dev/disk/${Validdisks[$diskcnt]}${PARTITION} ${cfsfailover_dmn}
done

Honestly, however, I don't understand the rest of your post.

Last edited by otheus; 01-30-2009 at 08:59 AM.. Reason: syntax
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

or statements?

how do i do an or in an if-then statement? i tried: if ; then bleh fi how???? (1 Reply)
Discussion started by: Blip
1 Replies

2. Shell Programming and Scripting

Please help on IF statements.

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)
Discussion started by: filthymonk
4 Replies

3. Shell Programming and Scripting

for i loop with conditional statements?

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)
Discussion started by: xgringo
2 Replies

4. Shell Programming and Scripting

HELP!! if statements

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)
Discussion started by: trob
1 Replies

5. UNIX for Dummies Questions & Answers

Help with For Statements

Hi, I am trying to write a for statement that will allow for the ps, who, finger, and date commands to run. Can anyone help? I use Putty. (22 Replies)
Discussion started by: lexydoll87
22 Replies

6. Shell Programming and Scripting

How to execute a no of SELECT COUNT(*) statements using a loop

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)
Discussion started by: ustechie
7 Replies

7. Homework & Coursework Questions

Using While and If statements

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)
Discussion started by: jjb1989
11 Replies

8. Shell Programming and Scripting

Too many if statements..

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)
Discussion started by: gameinn
3 Replies

9. Shell Programming and Scripting

2 statements in for loop

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)
Discussion started by: p1ne
5 Replies

10. Shell Programming and Scripting

For loop statements order of operations

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
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)
All times are GMT -4. The time now is 12:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy