backq(9r)backq(9r)NAME
backq - STREAMS: Gets a pointer to the previous queue
SYNOPSIS
#include <sys/stream.h>
queue_t * backq(
queue_t *current_queue );
ARGUMENTS
Specifies the pointer to the current queue. The typedef queue_t is an alternate name for struct queue_entry *.
DESCRIPTION
The backq interface returns a pointer to the queue preceding the current queue (the current_queue argument). If the current queue is a
read queue, backq returns a pointer to the queue downstream from the current queue, unless the current queue is the stream end. If the cur-
rent queue is a write queue, backq returns a pointer to the queue upstream from the current queue, unless the current queue is the stream
head.
RETURN VALUES
Upon successful completion, the backq interface returns a pointer to the queue preceding the current queue. Otherwise, it returns NULL.
SEE ALSO
Programmer's Guide: STREAMS
backq(9r)
Check Out this Related Man Page
insq(9r)insq(9r)NAME
insq - STREAMS: Inserts a STREAMS message into a queue
SYNOPSIS
#include <sys/stream.h>
int insq(
queue_t *message_queue,
MBLKP message,
MBLKP message_to_be_inserted );
ARGUMENTS
Specifies a pointer to the message queue that contains the message passed to the message argument. The typedef queue_t is an alternate name
for struct queue_entry *. Specifies the enqueued message before which the new message is to be inserted. The typedef MBLKP is an alternate
name for typedef struct msgb *. Specifies the message to be inserted. The typedef MBLKP is an alternate name for typedef struct msgb *.
DESCRIPTION
The insq interface inserts a STREAMS message into a queue. The message to be inserted (the message_to_be_inserted argument) is placed in
the queue (the message_queue argument) immediately before the message associated with the message argument. If the message argument is
NULL, insq places the new message at the end of the queue. The interface ignores the queue class of the new message and it updates all
flow-control parameters. The insq interface also enables the service procedure unless the QNOENB flag bit is set.
CAUTIONS
If the message argument is non-NULL, it must point to a message on the queue or a system panic could occur.
RETURN VALUES
Upon successful completion, insq returns the value 1. On failure, it returns the value zero(0).
SEE ALSO
Programmer's Guide: STREAMS
insq(9r)
#Author : kkodava
#!/usr/bin/ksh
#Use of this program is You can findout the no of days & day of starting and ending dates
#usage no_of_days startdate<yyyymmdd> enddate<yyyymmdd>
syy=`echo $1|cut -c1-4`
smm=`echo $1|cut -c5-6`
sdd=`echo $1|cut -c7-8`
eyy=`echo $2|cut -c1-4`
emm=`echo... (1 Reply)
Hi,
I am writing a script to use awk to generate a set of cp commands from an input file abc.
file abc:
/data/a.dbf
/data/june/b.dbf
desired output:
cp -pr a.dbf /data/a.dbf
cp -pr b.dbf /data/june/b.dbf
script:
$ cat abc | awk '{ print "cp -pr '`basename $1`' " $1 }'
I tried to... (4 Replies)
hi
I've been searching all over the internet to simply do the following:
$tempfile = "/usr/school/tempfile.dat";
$myvar = param('add'); ###add is the variable assigned to a popup menu
`ls -l $myvar * >> $tempfile` ###I also tried `ls -l ${myvar}* >>$tempfile`
open(ADDLIST,... (6 Replies)
Not sure if that title is decent, but here we go. I'm running this string of commands:
qstat -f $1 | sed 's/^*//' | sed -n -e ":a" -e "$ s/\n//gp;N;b a" | sed 's/\\,/,/' | awk -F"PBS_O_WORKDIR=" '{print $2}' | awk -F",PBS_O_SYSTEM" '{print $1}'In case you're curious is takes the output of a PBS... (3 Replies)
A quick question.
Can anyone tell me how to print a backquote character to a file in csh.
e.g. I need to print the below line to a file in csh. How to do it. Thanks.
`uuencode something something` (1 Reply)
Hello,
I have a few thousand files that contain backquotes (`) which were a typo in the program. Now I only want to delete these backquotes from these files.
In these cases I normally use the sed command in a script, but I can't seem to get sed to remove the backquotes. I tried several... (6 Replies)