Sponsored Content
Full Discussion: multiple pipelines
Top Forums UNIX for Dummies Questions & Answers multiple pipelines Post 86619 by ohhmyhead on Sunday 16th of October 2005 04:54:50 PM
Old 10-16-2005
multiple pipelines

howdy all,

i've been trying to find info on piping info between multiple commands from the command line, but i've been unable to find any examples of piping continuous data through a chain of commands. basically, i'm trying to parse data from the top command and send it out over udp to another application.

top -l0 | awk -f filepath | sendOSC 57111

my awk file pares the top info down to a couple lines of text. sendOSC is for sending open sound control messages over udp. the beginning works, i'm just trying to determine if my problem is in the pipes or the sendOSC command. most of the information i've found only deals with a single pipe. does anyone know of any special issues passing continuous info like this through multiple pipes?

thanks!
barb
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Pipelines

Now before this thread gets closed, please be aware this is not classwork or homework, I am trying to learn unix by myself, and have come stuck below. So it is a pointless to close this thread, as I am trying to improve my unix by asking advice from people. That is what I assume a forum is for! ... (1 Reply)
Discussion started by: Vn3050
1 Replies

2. Shell Programming and Scripting

Varialble in pipelines

Hi, As per shell docs because commands in pipelines are run as separate processes, variables set in a pipeline have no effect on the parent shell In the sample below I am unable to set variable in Proc1 so that I can see it in the main program Is there any work around ? Thanks Zam... (4 Replies)
Discussion started by: zam
4 Replies

3. UNIX for Dummies Questions & Answers

Building Pipelines?

How would I combine commands in a pipeline to produce an alphabetized list of who's online at a particular moment? Then: How would I take that pipeline and turn it into a command called "whoison"? (1 Reply)
Discussion started by: greeky
1 Replies

4. UNIX for Dummies Questions & Answers

grep command to find multiple strings in multiple lines in a file.

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. I am writing it another way to make it clear, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies

5. Shell Programming and Scripting

UNIX Pipelines

What if you want to have just one single pipeline that will create a file (let's say x) and we want all the content from another file (we can call it y), one word per line? (7 Replies)
Discussion started by: sarahahah
7 Replies

6. Shell Programming and Scripting

Grep from multiple patterns multiple file multiple output

Hi, I want to grep multiple patterns from multiple files and save to multiple outputs. As of now its outputting all to the same file when I use this command. Input : 108 files to check for 390 patterns to check for. output I need to 108 files with the searched patterns. Xargs -I {} grep... (3 Replies)
Discussion started by: Diya123
3 Replies

7. Shell Programming and Scripting

Reading multiple values from multiple lines and columns and setting them to unique variables.

Hello, I would like to ask for help with csh script. An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies

8. Shell Programming and Scripting

Removing carriage returns from multiple lines in multiple files of different number of columns

Hello Gurus, I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file. 1|ABC DEF|100|10 2|PQ RS T|200|20 3| UVWXYZ|300|30 4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies

9. Shell Programming and Scripting

sed parser behaving strange on replacing multiple words in multiple files

I have 4000 files like $cat clus_grp_seq10_g.phy 18 1002 anig_OJJ65951_1 ATGGTTTCGCAGCGTGATAGAGAATTGTTTAGGGATGATATTCGCTCGCGAGGAACGAAGCTCAATGCTGCCGAGCGCGAGAGTCTGCTAAGGCCATATCTGCCAGATCCGTCTGACCTTCCACGCAGGCCACTTCAGCGGCGCAAGAAGGTTCCTCG aver_OOF92921_1 ... (1 Reply)
Discussion started by: sammy777888
1 Replies

10. UNIX for Beginners Questions & Answers

How to apply the update statement in multiple servers on multiple dbs at a time .?

Hi , Can any please help the below requirement on all multiple servers and multiple dbs. update configuration set value='yes' ;1) the above statement apply on 31 Databases at a time on different Ip address eg : 10.104.1.12 (unix ip address ) the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
ensemble(n)							    [incr Tcl]							       ensemble(n)

__________________________________________________________________________________________________________________________________________________

NAME
ensemble - create or modify a composite command SYNOPSIS
itcl::ensemble ensName ?command arg arg...? or ensemble ensName { part partName args body ... ensemble partName { part subPartName args body part subPartName args body ... } } _________________________________________________________________ DESCRIPTION
The ensemble command is used to create or modify a composite command. See the section WHAT IS AN ENSEMBLE? below for a brief overview of ensembles. If the ensemble command finds an existing ensemble called ensName, it updates that ensemble. Otherwise, it creates an ensemble called ensName. If the ensName is a simple name like "foo", then an ensemble command named "foo" is added to the current namespace context. If a command named "foo" already exists in that context, then it is deleted. If the ensName contains namespace qualifiers like "a::b::foo", then the namespace path is resolved, and the ensemble command is added that namespace context. Parent namespaces like "a" and "b" are cre- ated automatically, as needed. If the ensName contains spaces like "a::b::foo bar baz", then additional words like "bar" and "baz" are treated as sub-ensembles. Sub- ensembles are merely parts within an ensemble; they do not have a Tcl command associated with them. An ensemble like "foo" can have a sub- ensemble called "foo bar", which in turn can have a sub-ensemble called "foo bar baz". In this case, the sub-ensemble "foo bar" must be created before the sub-ensemble "foo bar baz" that resides within it. If there are any arguments following ensName, then they are treated as commands, and they are executed to update the ensemble. The follow- ing commands are recognized in this context: part and ensemble. The part command defines a new part for the ensemble. Its syntax is identical to the usual proc command, but it defines a part within an ensemble, instead of a Tcl command. If a part called partName already exists within the ensemble, then the part command returns an error. The ensemble command can be nested inside another ensemble command to define a sub-ensemble. WHAT IS AN ENSEMBLE
? The usual "info" command is a composite command--the command name info must be followed by a sub-command like body or globals. We will refer to a command like info as an ensemble, and to sub-commands like body or globals as its parts. Ensembles can be nested. For example, the info command has an ensemble info namespace within it. This ensemble has parts like info names- pace all and info namespace children. With ensembles, composite commands can be created and extended in an automatic way. Any package can find an existing ensemble and add new parts to it. So extension writers can add their own parts, for example, to the info command. The ensemble facility manages all of the part names and keeps track of unique abbreviations. Normally, you can abbreviate info complete to info comp. But if an extension adds the part info complexity, the minimum abbreviation for info complete becomes info complet. The ensemble facility not only automates the construction of composite commands, but it automates the error handling as well. If you invoke an ensemble command without specifying a part name, you get an automatically generated error message that summarizes the usage information. For example, when the info command is invoked without any arguments, it produces the following error message: wrong # args: should be one of... info args procname info body procname info cmdcount info commands ?pattern? info complete command info context info default procname arg varname info exists varName info globals ?pattern? info level ?number? info library info locals ?pattern? info namespace option ?arg arg ...? info patchlevel info procs ?pattern? info protection ?-command? ?-variable? name info script info tclversion info vars ?pattern? info which ?-command? ?-variable? ?-namespace? name You can also customize the way an ensemble responds to errors. When an ensemble encounters an unspecified or ambiguous part name, it looks for a part called @error. If it exists, then it is used to handle the error. This part will receive all of the arguments on the command line starting with the offending part name. It can find another way of resolving the command, or generate its own error message. EXAMPLE
We could use an ensemble to clean up the syntax of the various "wait" commands in Tcl/Tk. Instead of using a series of strange commands like this: vwait x tkwait visibility .top tkwait window . we could use commands with a uniform syntax, like this: wait variable x wait visibility .top wait window . The Tcl package could define the following ensemble: itcl::ensemble wait part variable {name} { uplevel vwait $name } The Tk package could add some options to this ensemble, with a command like this: itcl::ensemble wait { part visibility {name} { tkwait visibility $name } part window {name} { tkwait window $name } } Other extensions could add their own parts to the wait command too. KEYWORDS
ensemble, part, info itcl 3.0 ensemble(n)
All times are GMT -4. The time now is 09:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy