Hi,
I'm trying to write a shell script that has a menu and then dependant on the selection, will automate some samba file transfer.
The problem is when I run the code without the case statement it runs fine. but when I put the case statement in the only way I can get the code to run is to... (6 Replies)
Hi All,
this small script is written to recognize user input character.. it is in small case .. upeer case or is a number... but when i input first capital letter say A.. it always gives small character.... what is the problem.
#!/bin/bash
echo "Enter the character"
read a
case $a in
)... (2 Replies)
In a case statement like below :
case $rental in
"car") echo "For $rental Rs.20 per k/m";;
"van") echo "For $rental Rs.10 per k/m";;
"jeep") echo "For $rental Rs.5 per k/m";;
"bicycle") echo "For $rental 20 paisa per k/m";;
*) echo "Sorry, I can not gat a $rental for you";;... (4 Replies)
Hi,
I have a script like below :
#!/bin/ksh
echo "Do you want to export all docs ?"
read alld
echo "Do you want to export template or report only "
read temr
case && ]
#arguments
;;
case && ]
#arguments
;;
case && ]
#arguments
;; (4 Replies)
i want to get user input like this
please tell which option to chose
1. mango 2. tango 3. rango
if user chooses mango
then it should execute a set of statements and again ask like this
what do you want to do
1.add 2.subtract 3.exit
when i choose exit it should goto my previous menu... (4 Replies)
Hi,
I am New to Unix Shell Scripting basically, i need some help in achieving a case statement in Shell script to call recursively That is if case having like 1 2 3 4 options , if user inputs 1 and gets executed case should ask for options again but user should not input the same input value 1,... (7 Replies)
Hi Gurus,
I have a very weird requirement and have no clue to resolve the issue. please help me get out this difficulty
below two tables, table1 contains the column name. D means this column used for the rule. for example: rule 0 is all columns have value, rule1 is col3 and col7 have no value.... (2 Replies)
Foe example we have three environments int,qa and prod.Each environment has some number of servers.
int=Server1,Server2,Server3
qa=Server4,Server5,Server6
prod=Server7,Server8,Server9
echo "Enter the Environment i.e int,qa,prod"
read env
case $env in
int)
## Need command where all the... (9 Replies)
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT PHP
put
put(9E) Driver Entry Points put(9E)NAME
put - receive messages from the preceding queue
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
int prefixrput(queue_t *q, mblk_t *mp);
/* read side */
int prefixwput(queue_t *q, mblk_t *mp);
/* write side */
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). This entry point is required for STREAMS.
ARGUMENTS
q Pointer to the queue(9S) structure.
mp Pointer to the message block.
DESCRIPTION
The primary task of the put() routine is to coordinate the passing of messages from one queue to the next in a stream. The put() routine is
called by the preceding stream component (stream module, driver, or stream head). put() routines are designated ``write'' or ``read''
depending on the direction of message flow.
With few exceptions, a streams module or driver must have a put() routine. One exception is the read side of a driver, which does not need
a put() routine because there is no component downstream to call it. The put() routine is always called before the component's correspond-
ing srv(9E) (service) routine, and so put() should be used for the immediate processing of messages.
A put() routine must do at least one of the following when it receives a message:
o pass the message to the next component on the stream by calling the putnext(9F) function;
o process the message, if immediate processing is required (for example, to handle high priority messages); or
o enqueue the message (with the putq(9F) function) for deferred processing by the service srv(9E) routine.
Typically, a put() routine will switch on message type, which is contained in the db_type member of the datab structure pointed to by mp.
The action taken by the put() routine depends on the message type. For example, a put() routine might process high priority messages,
enqueue normal messages, and handle an unrecognized M_IOCTL message by changing its type to M_IOCNAK (negative acknowledgement) and sending
it back to the stream head using the qreply(9F) function.
The putq(9F) function can be used as a module's put() routine when no special processing is required and all messages are to be enqueued
for the srv(9E) routine.
RETURN VALUES
Ignored.
CONTEXT
put() routines do not have user context.
SEE ALSO srv(9E), putctl(9F), putctl1(9F), putnext(9F), putnextctl(9F), putnextctl1(9F), putq(9F), qreply(9F), queue(9S), streamtab(9S)
Writing Device Drivers
STREAMS Programming Guide
SunOS 5.10 12 Nov 1992 put(9E)