This was supposed to be few lines of remarks. It expanded quickly in relation with my enthusiasm for this topic. I've been investing some time in the command line on my Mac. I am moving from a dilettante going to the shell on a per-need basis to a more seasoned terminal native. It pays off handesomely! It's hard to convey how nice it to have to have a keyboard-based unified environment instead of a series of disjoine…
OS X Command Line Utilities
61–70 of 243 posts
Re: OS X Command Line Utilities
#62The article doesn't mention the fun you can have with ssh + say. My co-workers and I used to ssh into the iMacs of non-technical users in our office and have a good laugh from a nearby room.
Re: OS X Command Line Utilities
#63I want "remote pbcopy"! I'd like to be able to log in to any remote host (usually Linux in my case), then tack something onto the command line I'm typing to copy it into the pastebuffer. ssh somehost cd /some/dir grep -lr foo . | remote_pbcopy I guess something like this is possible with GNU Screen or with Tmux, and perhaps the Tmux/iTerm interaction helps, but I've never figured it out.
On your Mac: ssh -R 19999:localhost:22 remote_host On the remote host: command_that_prints_stuff | ssh localhost -p 19999 pbcopy ________ The first command routes the port 19999 on the remote host to port 22 on the computer you're using. ssh part on the second command connects to 19999 (and thus 22 on your computer) and runs the pbcopy command in the current shell (which is the pipe from command_that_prints_stuff)
ssh remote_host command_that_prints_stuff | pbcopy
?Re: OS X Command Line Utilities
#64The screencapture options are wrong. "Select a window using your mouse, then capture its contents without the window’s drop shadow and copy the image to the clipboard: $ screencapture -c W" -c captures the cursor, W is not an option. The real command for this is: $ screencapture -C -o
Re: OS X Command Line Utilities
#65Earlier quoted context omitted.
It knows how to sing "In The Hall Of The Mountain King" as well: say -v cellos "Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo"
OK, how did you discover that?
Re: OS X Command Line Utilities
#66This was supposed to be few lines of remarks. It expanded quickly in relation with my enthusiasm for this topic. I've been investing some time in the command line on my Mac. I am moving from a dilettante going to the shell on a per-need basis to a more seasoned terminal native. It pays off handesomely! It's hard to convey how nice it to have to have a keyboard-based unified environment instead of a series of disjoine…
This is an excellent point and one that's not nearly as appreciated as it should be. Fullscreen mode was written off in Lion as an example of Apple dumbing down the platform and making it more like iOS, but it's the perfect mode for writers, coders--and really just about any kind of creator who needs to focus.
Re: OS X Command Line Utilities
#67 $ mdf "*invoice*.pdf"
/Users/smw/Downloads/Invoice-0000006.pdf
https://gist.github.com/smw/a21a9f675ed3358830daRe: OS X Command Line Utilities
#68One command I can't live without: textutil. Basically it's a command-line front end to Apple's TextKit file import/export library. Works with a bunch of rich text/word processor formats, including OpenDoc, RTF, HTML 5, and MS Word. Critically, the HTML it emits is vastly better than the bloated crap that comes out of Microsoft Word or LibreOffice when you save as HTML ... Install pandoc and multimarkdown as well and…
Re: OS X Command Line Utilities
#69Re: OS X Command Line Utilities
#70One command I can't live without: textutil. Basically it's a command-line front end to Apple's TextKit file import/export library. Works with a bunch of rich text/word processor formats, including OpenDoc, RTF, HTML 5, and MS Word. Critically, the HTML it emits is vastly better than the bloated crap that comes out of Microsoft Word or LibreOffice when you save as HTML ... Install pandoc and multimarkdown as well and…
Pandoc and multimarkdown are the greatest. I've never found a way to fit textutil into that workflow, though. Is there anything it can do that pandoc can't by itself?
(Annoyingly it doesn't provide a way to get at the guts of Apple's own Pages files. Which sucks because the only tools for transcoding Pages are Pages itself, and icloud.com.)