05-27-2011
Any idea why this double pipe causing problem. I am bit confused with that.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
If I do "ls -l filename" in a script, it should return something like this:
-rw-r--r-- 1 user group 5945 Feb 28 14:24 filename
How do I put each of the above strings into a different variable?
eg Permissions, username, groupname, date (7 Replies)
Discussion started by: Sniper Pixie
7 Replies
2. Shell Programming and Scripting
I'm only new to shell programming and have been given a task to do a program in .sh, however I've come to a point where I'm not sure what to do. This is my code so far:
# process all arguments (i.e. loop while $1 is present)
while ; do
# echo "Arg is $1"
case $1 in
-h*|-H*) echo "help... (4 Replies)
Discussion started by: switch
4 Replies
3. Shell Programming and Scripting
Hi Guys,
I want to extract users environment variables via a sh script, and for some reason it is not working.
According to the su man page: Example 3: Executing command with user bin's Environment and
Permissions
To execute command with the temporary environment and per-... (2 Replies)
Discussion started by: Tornado
2 Replies
4. Shell Programming and Scripting
Hi guys,
I am stuck in this problem. Please help.
I have two files.
FILE1 (with records starting from '>' )
>TC1723_3 similar to Scific_A7Q9Q3
EMSPSQDYCDDYFKLTYPCTAGAQYYGRGALPVYWNYNYGAIGEALKLDLLNHPEYIEQN
ATMAFQAAIWRWMNPMKKGQPSAHDAFVGNWKP
>TC214_2 similar to Quiet_Ref100_Q8W2B2 Cluster;... (1 Reply)
Discussion started by: smriti_shridhar
1 Replies
5. Shell Programming and Scripting
Hello all.
I can not remember the command to extract a variable from the date command.
Basically what I need to do is to store the values of date in variable and rearrange them. I can not remember the command or the syntax to do so.
so..
date
Mon Mar 8 06:57:19 GMT 2010
$1 $2 ... (12 Replies)
Discussion started by: adelsin
12 Replies
6. Shell Programming and Scripting
hi all,
I'm trying to automate some tasks and while I've got the script itself working, I'm having difficulties with automatic file detection and associated variable setting...
for example, in a directory I've got several files... something along the lines of:
xis0_NAME_src.file... (2 Replies)
Discussion started by: u5j84
2 Replies
7. Windows & DOS: Issues & Discussions
Hello,
I need some help,
I got a CSV file called test.txt with this text in it :
08/02/2011;0,677;0,903;1,079;1,336;1,513;1,683
There's only a line and i need to copy theese numbers into variables :
0,677
0,903
1,079
1,336
1,513
1,683
The output file should look like this... (5 Replies)
Discussion started by: jujulips
5 Replies
8. Shell Programming and Scripting
I have a string like
Months=jan feb mar april x y ..
Here the number of fields in Months is not definite
I need to extract each field in the Months string and pass it to awk . Don't want to use for in since it is a loop . How can i do it (2 Replies)
Discussion started by: Nevergivup
2 Replies
9. UNIX for Dummies Questions & Answers
Hi UNIX Members,
I've been tasked with performing the following:
Extract a block of data in column form
#This data changes each time, therefore automating future procedures
Please Note the following:
line = reading a line from a file_list that leads to the data
The filename is called... (16 Replies)
Discussion started by: Klor
16 Replies
10. Shell Programming and Scripting
Hello, new to the forums and to awk. Glad to be here. :o
I want to pass two shell (#!/bin/sh) variables through to awk and use them. They will determine where to start and stop text extraction.
The code with the variables hard-coded in awk works fine; the same code, but with the shell... (7 Replies)
Discussion started by: bedtime
7 Replies
LEARN ABOUT OPENSOLARIS
pipemod
pipemod(7M) STREAMS Modules pipemod(7M)
NAME
pipemod - STREAMS pipe flushing module
DESCRIPTION
The typical stream is composed of a stream head connected to modules and terminated by a driver. Some stream configurations such as pipes
and FIFOs do not have a driver and hence certain features commonly supported by the driver need to be provided by other means. Flushing is
one such feature, and it is provided by the pipemod module.
Pipes and FIFOs in their simplest configurations only have stream heads. A write side is connected to a read side. This remains true when
modules are pushed. The twist occurs at a point known as the mid-point. When an M_FLUSH message is passed from a write queue to a read
queue the FLUSHR and/or FLUSHW bits have to be switched. The mid-point of a pipe is not always easily detectable, especially if there are
numerous modules pushed on either end of the pipe. In that case there needs to be a mechanism to intercept all message passing through the
stream. If the message is an M_FLUSH message and it is at the mid-point, the flush bits need to be switched. This bit switching is handled
by the pipemod module.
pipemod should be pushed onto a pipe or FIFO where flushing of any kind will take place. The pipemod module can be pushed on either end of
the pipe. The only requirement is that it is pushed onto an end that previously did not have modules on it. That is, pipemod must be the
first module pushed onto a pipe so that it is at the mid-point of the pipe itself.
The pipemod module handles only M_FLUSH messages. All other messages are passed on to the next module using the putnext() utility routine.
If an M_FLUSH message is passed to pipemod and the FLUSHR and FLUSHW bits are set, the message is not processed but is passed to the next
module using the putnext() routine. If only the FLUSHR bit is set, the FLUSHR bit is turned off and the FLUSHW bit is set. The message is
then passed on to the next module using putnext(). Similarly, if the FLUSHW bit is the only bit set in the M_FLUSH message, the FLUSHW bit
is turned off and the FLUSHR bit is turned on. The message is then passed to the next module on the stream.
The pipemod module can be pushed on any stream that desires the bit switching. It must be pushed onto a pipe or FIFO if any form of flush-
ing must take place.
SEE ALSO
STREAMS Programming Guide
SunOS 5.11 21 Aug 1992 pipemod(7M)