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

Pages: 1-

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 13:28

I have never knew anyone that uses zsh. Which OS has it by default?

Name: Anonymous 2012-02-29 13:30

>>2
There is no such OS right now, but a lot of people are speculating that Mac OS will switch to it as part of the ongoing GNU purge (the current default is Bash).

Name: >>3 2012-02-29 13:54

To clarify, zsh already ships with Mac OS right now, but it is not the default.

Name: Anonymous 2012-02-29 15:21

>>3
I'm glad vendors are doing this. Maybe by 2020 we'll view `that old GNU thing' as a small hiccup in the everlasting glory of UNIX.

Name: Anonymous 2012-02-29 15:59

>>5
GNU's Not Unix

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!

Name: Anonymous 2012-02-29 16:27

>>7
They need to do that to make Clang look better.

Name: Anonymous 2012-02-29 18:06

>>8
They need clang because importing the default cocoa header will include hundreds of other in turn. [spoilers]For. [spoilers]Each. [spoilers]Source. [spoilers]File.[/spoilers][/spoilers][/spoilers][/spoilers]

Name: Anonymous 2012-02-29 21:47

>>9
Let me guess, they're all full of templates as well? So their codes take forever to compile? No wonder rubists like MAC, none of them know how C works. Hope you like your slow, MACfags.

Name: Anonymous 2012-02-29 22:17

>>1
Nice trick, but check out my dubs!

Name: Anonymous 2012-03-01 14:15

>>11
Nice dick, but check out my TRUBS!!

Name: Anonymous 2012-03-01 14:58

>>12
You should have said "trek out my CHUBS." That way you would get an extra dick joke in there for good measure, and also your post would exclusively use real words. 4/10.

Name: Anonymous 2012-03-01 15:32

>>1
temp files considered harmful, use a file descriptor instead <(foo)

bash can do this too btw

Name: Anonymous 2012-03-01 17:18

>>14
UUUuuUuuuuuuuuuuuuuuuuuuuuuuuuuu U U uUuUuuuuuuuuuuuuuuuuuuuuuuuuuuuu!!!!?!! uuUuuuuuuuuuuuuuuuuuuuuuuuuuuuuu U uuUUuuuuuuuuuuuuuuuuuuuuuuuuuuuu!!!!?!! U uuUUuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuUuuuuuuuuuuuuuuuuuuuuuuuuuuu UuUUuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuUuuuuuuuuuuuuuuuuuuuuuuuuuuuu UUuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uUuUuuuuuuuuuuuuuuuuuuuuuuuuuuuu?!??!!! U UUuUuuuuuuuuuuuuuuuuuuuuuuuuuuuu uUUUuuuuuuuuuuuuuuuuuuuuuuuuuuuu??!?!!! uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu U UUuuuUuuuuuuuuuuuuuuuuuuuuuuuuuu????!?! uUuuUuuuuuuuuuuuuuuuuuuuuuuuuuuu U uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uUUUuuuuuuuuuuuuuuuuuuuuuuuuuuuu UUuuUuuuuuuuuuuuuuuuuuuuuuuuuuuu uUuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu uUUuuuUuuuuuuuuuuuuuuuuuuuuuuuuu!?!?!!! tomot

Name: Anonymous 2012-03-01 17:40

>>15
U UUuuu uuuuu uuuuu UuuUUu!!??!?! U u Uuuu UUuUu uuUUu!????!! UUUuUUu UUuuuu uUuUuu UUUuUUu U??!!?! UUUuuu uUUUUUu Uuuuuu uUuuuu uUuUUUu U?!!!?! U UUuuUu!?!!??! UUuu U uuUUu uuu!????!! UuuUu U UuUUu!????!! u U Uu UuUu UuuUu U uUUUu uu UuUUu!????!! U uUuu uu!????!! Uuuu UuUu UUUu U!?!??!! uUUu U?!!??!! uuuu uu UuUu Uuuu U!?!??!! UUu uUUu uuuu U Uu U uUuu Uuuu!?!??!! uUUUUUu UUUuUUu uuuUuu UUuUUUu UUUuuu Uuuuuu uUUUUUu uUUuUUu uuuUuu UuuUuu U?!!!?! U uUUUu UuUu uUuuu!!!?!?! U!????!! UuUu U uu uu UUUUu!??!?!! UUuuUUu UUUuUUu UuUUuUu uuUUuUu UUUUUUu UuUuUUu UUuUUUu U!????! tomot

Name: Anonymous 2012-03-02 12:43

Why would you use zsh?

Name: Anonymous 2012-03-02 12:50

>>17
Good point. scsh is superior.

Name: Anonymous 2012-03-02 13:05

>>15
>>16
I don't like you.

Name: Anonymous 2012-03-02 13:52

>>17
Good point. tcsh is superior.

Name: Anonymous 2012-03-02 14:42

>>18
scsh is not interactive. You would have a better experience using SLIME as your shell, issuing system commands via Common Lisp.

>>20
tcsh is a piece of shit. At least suggest something constructive like fish.

Name: Anonymous 2012-03-02 15:21

[Dubs/22]% check =(dubs)

Name: Anonymous 2012-03-02 15:58

>>21
lisp is shit

Name: Anonymous 2012-03-02 16:06

>>23
Yeah but what's a good shell

Name: Anonymous 2012-03-02 16:13

>>24
rdsh Royal Dutch Shell

Name: Anonymous 2012-03-02 19:09

>>25
It's actually RDSA/RDSB, you toilet-scrubbing mental midget

Name: Anonymous 2012-03-02 19:31

>>26
I don't want to encourage investment into a murderous corporation.

Name: Anonymous 2012-03-02 19:41

>>27
implying that /prog/lodytes have money
I don't think telling people the real ticker symbol could do a whole lot of damage.

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