Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ZSH party tricks

Name: Anonymous 2012-02-29 13:13

Every single person here has used the $(find ~) and `which sbcl` syntax to expand command output as an argument to another command, but a shitload of people don't know that you can write =(foo) instead to pipe the output to a temp file. This is great when you want to edit the output of a command somehow but you don't need to save it. For example:

[Code/Other]% ls
APL    Cobol    Glasses    MIPS    VHDL
[Code/Other]% ed =(man ed)
26242
1,10p

ED(1)                     BSD General Commands Manual                    ED(1)

NAME
     ed, red -- text editor

SYNOPSIS
     ed [-] [-sx] [-p string] [file]
     red [-] [-sx] [-p string] [file]

2p
ED(1)                     BSD General Commands Manual                    ED(1)
2s/  BSD/Linux/
2p
ED(1)                   Linux General Commands Manual                    ED(1)
w
26242
q
[Code/Other]% ls
APL    Cobol    Glasses    MIPS    VHDL
[Code/Other]%


If you only need the same behavior as a pipe (|), you can have the shell send it to a FIFO node on the filesystem by writing <(foo) instead of =(foo). I think it's the other way around in Bash.

I'm trolling you all by posting actual stuff instead of serious discussions about Zionism. I have every expectation it will work and be amazing. Seriously fuck you guys.

Name: Anonymous 2012-02-29 16:06

>>5
Linux vendors are using actually good versions of Bash and actually good versions of GCC. Apple is holding itself back by forcing outdated versions down its user's throat!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List