Instead of a goto you could use something like this:
In your start function the second ! should be at the first character position on the line or it will not work..
Are you sure it is Bourne Shell, are you on Solaris, otherwise /bin/sh is likely a POSIX shell which allows or a less restrictive syntax.
This User Gave Thanks to Scrutinizer For This Post:
Hi,
I'm trying to use the goto in ksh but it does not appear to be a valid command. Is that only valid in csh? Anything similar in ksh that I can use?
Appreciate any help you can provide.
Thanks.
geraldine (4 Replies)
All
Please help to provide "goto" functionality in KORN shell script.
ex:
1: Command
Process some command
if check some variable
true
goto 1
else
process some other
Please help to implement this example in korne... (1 Reply)
Hey Guys.. I just want to know how to use Goto statement in shell scripts.
I know the basic use of statement.
Goto Label
The above statement will search for some label which must be defined in the script itself as:
label:
I tried these combinations but I didn't work out for me and I'm... (7 Replies)
I have a test script for using goto statement but its not working. please help
i tried both in linux and hp-ux it's not working please help
#! /bin/ksh
t=`ps -ef|grep ti.sh|grep -v grep`
if ; then
goto start
else
goto stop
fi
start:
echo "start"
stop:
echo "stop" (5 Replies)
uname -a returns: SMP Tue May 17 17:52:23 EDT 2005 i686 athlon i386 GNU/Linux
I have many aliases beginning with "goto" so...
if I type goto and then hit return (oops)
A goto prompt pops up and I cant exit from it(I tried MANY key seqs)
The only way to exit is to kill the term window... (2 Replies)
Dear All,
Can any one pls let me the command for how to goback to previous visited directory from the current working directory in SunOS ?
In case of HP-UX; the same can be resolved through "cd -" command.
Thanks in advance!
Prasanth Babu. (6 Replies)
Im trying to do something like this but I cant find any documentation.
read X
if
then goto ThisLine
fi
OTHER CODE
OTHER CODE
Label: ThisLine echo "You entered 1" (5 Replies)
my code does somthing like this:
#!bin/ksh
sqlplus / | While read id
do
temp=`echo $id`
i = i+1
done
j=0
while
do
--connecting to sql and executing a Stored proc for 1st id
--checking for the status
status = $?
if
error
--need to... (1 Reply)
Hey :) I am trying to understand the command goto.
I have some questions regarding the goto manual.
1.What does the underlined part mean?
I'm not allowed to type goto in the shell? But if goto is written into a file everything is okay?
2.So if a part of my file looks like this
...
goto... (8 Replies)
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
LEARN ABOUT SUNOS
miocack
miocack(9F) Kernel Functions for Drivers miocack(9F)NAME
miocack - Positively acknowledge an M_IOCTL message
SYNOPSIS
#include <sys/stream.h>
#include <sys/strsun.h>
void miocack(queue_t *wq, mblk_t *mp, intcount, int rval);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
wq Write queue associated with the read queue to send the M_IOCACK on.
mp M_IOCTL message.
count Value to set the ioc_count of the iocblk(9S) to.
rval Value to set the ioc_rval of the iocblk(9S) to.
DESCRIPTION
The miocack() function converts an M_IOCTL message into a M_IOCACK message and sends the resulting message upstream.
To convert the message, miocack() changes the message type to M_IOCACK, sets the 'ioc_count' and 'ioc_rval' members of the iocblk(9S) asso-
ciated with mp to the passed-in values, and clears the 'ioc_error' field. If the caller specifies a non-zero value for count, it is
expected that the caller has already set 'mp->b_cont' field to point to a message block with a length of at least count bytes.
Callers that only need to perform the message conversion, or need to perform additional steps between the conversion and the sending
of the M_IOCACK should use mioc2ack(9F).
RETURN VALUES
None.
CONTEXT
This function can be called from user, kernel or interrupt context.
NOTES
Callers must not hold any locks across a miocack() that can be acquired as part of put(9E) processing.
SEE ALSO mioc2ack(9F), put(9E), iocblk(9S)
STREAMS Programming Guide
SunOS 5.10 9 June 2004 miocack(9F)