Live data from Hacker News

Fun at the Unix Terminal

blog.regehr.org

21–30 of 56 posts

Re: Fun at the Unix Terminal

#22
Instead of:

    $ fortune > my_fortune.txt
    $ say -f my_fortune.txt
One could use the underrated (bashism) process substitution:

    $ say -f 
Which works wonders for e.g diff'ing live:

    $ diff 

Re: Fun at the Unix Terminal

#23

Does anyone have a place/site for browsing through new/popular utilities? I've been on Ubuntu for the last year and I love it, but reading this I just realised I don't have anywhere to browse or find things like this.

Well, this is not specifically for utilities in the sense of scripts in a file, or compiled binaries, but commandlinefu.com has many Unix one-or-more-liners.

http://www.commandlinefu.com/commands/browse

Re: Fun at the Unix Terminal

#24
For rot13, I've found it particularly helpful to have an alias set up to translate the contents of the clipboard. I basically always have a terminal on screen, so to read rot13 text I just have to copy and run a single command. On OS X:

    alias rot13='tr a-zA-Z n-za-mN-ZA-M'
    alias pbr13='pbpaste | rot13; echo'
(echo adds a newline to play well with bash; on linux I use xsel instead of pbpaste.)

Re: Fun at the Unix Terminal

#26
post #22

Instead of: $ fortune > my_fortune.txt $ say -f my_fortune.txt One could use the underrated (bashism) process substitution: $ say -f Which works wonders for e.g diff'ing live: $ diff

Why would you even bother with that when `say` can take a string or read from stdin?

Just use

    $ say $(fortune)
or

    $ fortune | say -f-

For bonus coolness, add "-i" (it prints the lines and highlights the current word during reading).

Re: Fun at the Unix Terminal

#27
post #22

Instead of: $ fortune > my_fortune.txt $ say -f my_fortune.txt One could use the underrated (bashism) process substitution: $ say -f Which works wonders for e.g diff'ing live: $ diff

Why would you even bother with that when `say` can take a string or read from stdin? Just use $ say $(fortune) or $ fortune | say -f- For bonus coolness, add "-i" (it prints the lines and highlights the current word during reading).

Because it's fun spawning a new process and watching the otherwise idle cores of your box reach 0.1% usage for a millisecond.

Re: Fun at the Unix Terminal

#28

Does anyone have a place/site for browsing through new/popular utilities? I've been on Ubuntu for the last year and I love it, but reading this I just realised I don't have anywhere to browse or find things like this.

You can view a list of new Ubuntu packages from its website [0]. You might also want to check out the packages in the games [1], misc [2] and text [3] sections, which are full of fun utilities. You might also want to view the man pages from the games section [4].

[0] http://packages.ubuntu.com/zesty/newpkg?mode=byage

[1] http://packages.ubuntu.com/zesty/games/

[2] http://packages.ubuntu.com/zesty/misc/

[3] http://packages.ubuntu.com/zesty/text/

[4] https://linux.die.net/man/6/

Post reply on HN