I tried to cat a file to another user that was logged in, but I received an error message that displayed something like:
%cat funny > /dev/ttyp3
zsh: permission denied: /dev/ttyp3
Thank you all for your help (1 Reply)
The behavior of the following 2 operations is unexpected. K1 and K2 are files here :-
1) cat < K1 K2
The above operation should actually display contents of the both files.
But it gives the contents of K2 only. How is that ?
2) cat > K1 K2
Above operation takes the contents of... (2 Replies)
Hello,
So I sorted my file as I was supposed to:
sort -n -r -k 2 -k 1 file1 | uniq > file2
and when I wrote
> cat file2
in the command line, I got what I was expecting, but in the script itself
...
sort -n -r -k 2 -k 1 averages | uniq > temp
cat file2
It wrote a whole... (21 Replies)
Hello members,
I get an unexpected "end of file" error while trying to execute the following piece of code in the bash / ksh shell. I'm assuming the problem is with using the "execute immediate statement"
#! /bin/bash
tname="table"
for i in *
do
sqlstr="create table $tname$i as select... (3 Replies)
All,
I have a requirement to write a script where I check for Input redirection when the script was executed, based on which I handle my logic. Below is the example:
my.script
#! /bin/ksh
# Not sure how to frame the if condition below
if ; then
echo "Input Redirected from a file"
... (7 Replies)
Hello all,
I have a for loop executing in a script that I want to redirect STDOUT to screen and to file, while directing STDERR to the bit bucket. Here is the general sentax of what I'm doing:
for i in thingy
do
some_command ${i}
done 1>&1 | tee ${LOGFILE} 2> /dev/null
What I am... (2 Replies)
Hi,
#!/bin/bash
while ;
do
rm -f /tmp/pipe
mkfifo /tmp/pipe
./yuv4mpeg_to_v4l2 < /tmp/pipe &
mplayer tom_and_jerry.mp4 -vf scale=480:360 -vo yuv4mpeg:file=/tmp/pipe
sleep 65;
done
When I run this - after mplayer finishes playing video it says - Exiting... (End of... (2 Replies)
Hi,
when I try to redirect input and the command is described as a string within an array redirection does not work. why?
#!/bin/bash
dir=("tail < ./hello.txt")
tail < ./hello.txt #works
${dir} #does not work (2 Replies)
Discussion started by: heinzel
2 Replies
LEARN ABOUT PHP
bcanput
bcanput(9F) Kernel Functions for Drivers bcanput(9F)NAME
bcanput - test for flow control in specified priority band
SYNOPSIS
#include <sys/stream.h>
int bcanput(queue_t *q, unsigned char pri);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
q Pointer to the message queue.
pri Message priority.
DESCRIPTION
bcanput() searches through the stream (starting at q) until it finds a queue containing a service routine where the message can be
enqueued, or until it reaches the end of the stream. If found, the queue containing the service routine is tested to see if there is room
for a message of priority pri in the queue.
If pri is 0, bcanput() is equivalent to a call with canput(9F).
canputnext(q) and bcanputnext(q, pri) should always be used in preference to canput(q->q_next) and bcanput(q->q_next, pri) respectively.
RETURN VALUES
1 If a message of priority pri can be placed on the queue.
0 If the priority band is full.
CONTEXT
bcanput() can be called from user or interrupt context.
SEE ALSO bcanputnext(9F), canput(9F), canputnext(9F), putbq(9F), putnext(9F)
Writing Device Drivers
STREAMS Programming Guide
WARNINGS
Drivers are responsible for both testing a queue with bcanput() and refraining from placing a message on the queue if bcanput() fails.
SunOS 5.10 11 Apr 1991 bcanput(9F)