You can have more than one line in a while/until condition.
The following uses a code block between until...do plus another explicit code block within {...}
This User Gave Thanks to MadeInGermany For This Post:
Wow I'm so zoned out I don't even know if I posted this question up already (I couldn't find it in my book marks or in "yesterday's" post).
My question is, I'm writing a korn script that does something like the following, but I don't yet completely understand the syntax. I need to check that... (16 Replies)
Surely there's an easier way to do this, lets see if anyone knows! I am new to scripting so go easy on me!
I have the following script and at the moment it doesn't work and I believe the problem is that I am using a while loop within a while loop. When I run the script using sh -x I can see... (6 Replies)
Hi,
root@server] df -h
121G 14G 101G 12% /home
147G 126G 14G 91% /backup
We having our site files and images are storing in
/backup/home/user/files/ through symbolic link created in /home directory pointing in /backup directory as following.
root@server] cd /home... (1 Reply)
Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP.
I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Hi experts,
I just want to know if there is a better solution to my nested while read loops below:
while read line; do
while read line2; do
while read line3; do
echo "$line $line2 $line3"
done < file3.txt
done < file2.txt
done < file1.txt >... (4 Replies)
hello
i'm writing a script and I want to use a for loop inside a while loop as following:
while read line;
do
echo $line
for i in $vrm;
do
echo $i
done
done < './contacts'
when i use just the while loop it prints the lines from file ./contacts just... (13 Replies)
Firstly, I would like to apologize if this is not the appropriate sub-forum to post about GNU/BSD makefile scripting. Though my code is in C++, because I am focusing on the makefile I thought it would go better in shell scripting. Please correct me if I am wrong.
Secondly, I am not interested in... (0 Replies)
Hi.
How can I create a history function? (By "read" command or so)
&
How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A)
Thanks in advance. (4 Replies)
I am using this code:
for e in {1..14}
do
awk '{gsub(/^.*GGGGGG|TTTTT.*$/,"",$0)} 1' $e.1 > ${e}.2
done
However, in the second loop instead of GGGGGG|TTTTT, I should use AAAAAA|CCCCCC.
For third loop CCAAAA|CCCCAA, so on and so forth. Is there any way to accomplish this without writing... (20 Replies)
Discussion started by: Xterra
20 Replies
LEARN ABOUT CENTOS
strategy
strategy(9E) Driver Entry Points strategy(9E)NAME
strategy - perform block I/O
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixstrategy(struct buf *bp);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is required for block devices.
PARAMETERS
bp Pointer to the buf(9S) structure.
DESCRIPTION
The strategy() routine is called indirectly (through cb_ops(9S)) by the kernel to read and write blocks of data on the block device. strat-
egy() may also be called directly or indirectly to support the raw character interface of a block device (read(9E), write(9E) and
ioctl(9E)). The strategy() routine's responsibility is to set up and initiate the transfer.
In general, strategy() should not block. It can, however, perform a kmem_cache_alloc(9F) with both the KM_PUSHPAGE and KM_SLEEP flags set,
which might block, without causing deadlock in low memory situations.
RETURN VALUES
The strategy() function must return 0. On an error condition, it should call bioerror(9f) to set b_flags to the proper error code, and call
biodone(9f). Note that a partial transfer is not considered to be an error.
SEE ALSO ioctl(9E), read(9E), write(9E), biodone(9F), bioerror(9F), buf(9S), cb_ops(9S), kmem_cache_alloc(9F)
Writing Device Drivers
SunOS 5.10 6 Nov 2003 strategy(9E)