# Piping multiple results

**URL:** https://forum.highend3d.com/t/piping-multiple-results/4323
**Category:** Maya
**Tags:** mel
**Created:** [June 24, 2004, 10:36pm UTC](https://forum.highend3d.com/t/piping-multiple-results/4323 "2004-06-24T22:36:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chadrik](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/c/ba9def/32.png) [@chadrik](https://forum.highend3d.com/u/chadrik)
#### Post date: [June 24, 2004, 10:36pm UTC](https://forum.highend3d.com/t/piping-multiple-results/4323/1 "2004-06-24T22:36:31Z")

</div>

quick question that i've been wordering about for a long time:

is there anyway to pipe a return value into another command and then gather that return value in one line? for instance:

if (`size`listConnections -s 1 -d 0 group5.translateX``)  
 print "spankn";  
}

this doesn't work, but this gives you the gist of what i want to do. like the way you can continuously pipe one result into the next command in tshell with the | operator.

thanks,  
chad

---

<div class="post-metadata">

### Author: ![dbiggs](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@dbiggs](https://forum.highend3d.com/u/dbiggs)
#### Post date: [June 25, 2004, 5:57am UTC](https://forum.highend3d.com/t/piping-multiple-results/4323/2 "2004-06-25T05:57:05Z")

</div>

like this?

if (size(`listConnections -s 1 -d 0 group5.translateX`)) {  
print "spankn";   
}

---

<div class="post-metadata">

### Author: ![naughty](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/n/35a633/32.png) [@naughty](https://forum.highend3d.com/u/naughty)
#### Post date: [June 25, 2004, 11:24am UTC](https://forum.highend3d.com/t/piping-multiple-results/4323/3 "2004-06-25T11:24:55Z")

</div>

do you mean more like this?:

string $shapes[] = `ls -type "mesh"`listRelatives -c `ls -sl```;

yes, you can.. you do it like this:

string $shapes[] = ls("-type","mesh",(listRelatives("-c",(ls("-sl")))));

and you end up NOT using the `` at all... it's pretty hard to get right at times but if you get your head round it and approach the construction carefully it can be done!

:nathaN
