I'm trying to pass a filename, or all the files in the current directory to the ls command with a script. Unsuccessful so far, here are a few of my attempts:
#!/bin/ksh
read fname
#if (( $# > 0 )); then
$fname | ls -l
#fi
this produces a long listing of all the files in my current... (4 Replies)
I've written a script (bgrep) for a more advanced grep command (& attached a cut down version below). I'm trying allow all grep options to be used, or in any combination.
The script works fine if I type say
bgrep -i -files product
it will return a non-case sensitive list of matches for... (3 Replies)
Hi,
I have a script which adds the user credentials to an ldap server. Im passing the variables as below..
/path/my_script $uname $pwd $environ ${deposit}
If i enter some special characters like ';' in $pwd, script returns an error which is set to display if the user enters... (5 Replies)
Hi
I have a script to which I pass multiple arguments, for example lets say the script name is "abc". I run the script like
./abc def /file <directory location>
In the above "def" is the first argument and "/file" is the second argument. I expect <directory location> that is passed after... (4 Replies)
I have an awk script below which I call using for example
awk -f ../../A-Scripts/select-model.awk iterations.txt 16x12 10
I want to be able to use it in a different way like this
awk -f ../../A-Scripts/select-model.awk iterations.txt nxz=16x12 iter=10
or
awk -f... (1 Reply)
I need to pass arguments to a shell script.My batch is calling some java program.
#################
x=$1
y=$2
java -classpath program
###################
if first parameter and second parameter is null then
java -classpath program
if first parameter is not null and second parameter is... (3 Replies)
I have noticed this thing using csh when passing arguments
Suppose I call a csh script using
../Scripts/plot-model.csh -vmod="npt02-z30.vmod" -R="0/80/0/30" -c="0/4.5" -aspr="1:10"
Somehow the " get removed when doing
$argv
ending up with
-vmod=npt02-z30.vmod... (0 Replies)
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Hi,
I know with getopts you can pass arguments from the command line
./script -ab -c apple
But it doesn't support 2 or more arguments for ONE option. Is there any other way to do this?
Thanks (2 Replies)
I have a script test.sh which reads various inputs from a user.
#!/bin/ksh
read x
read y
read z
echo x: $x y: $y z: $z
# read few more things again
read a
read b
echo a: $a b: $b
When i run this script as
test.sh << EOF
1
2
EOF (3 Replies)
Discussion started by: ariesb2b
3 Replies
LEARN ABOUT SUNOS
putnext
putnext(9F) Kernel Functions for Drivers putnext(9F)NAME
putnext - send a message to the next queue
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
void putnext(queue_t *q, mblk_t *mp);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
q Pointer to the queue from which the message mp will be sent.
mp Message to be passed.
DESCRIPTION
putnext() is used to pass a message to the put(9E) routine of the next queue in the stream.
RETURN VALUES
None.
CONTEXT
putnext() can be called from user or interrupt context.
EXAMPLES
See allocb(9F) for an example of using putnext().
SEE ALSO put(9E), allocb(9F), put(9F), qprocson(9F)
Writing Device Drivers
STREAMS Programming Guide
NOTES
The put() and putnext() functions should be called only after qprocson() is finished.
SunOS 5.10 18 Feb 1998 putnext(9F)