258 reputation
14
bio website paypal.com
location Redwood City, CA
age 40
visits member for 2 years, 1 month
seen Aug 24 '13 at 16:01
I'm a software engineer with interests in programming languages and music.

Jun
9
awarded  Yearling
Jun
10
comment upgraded local git on Lion, now what?
Btw, cleaning of Homebrew is covered here: superuser.com/questions/203707/…
Jun
10
comment upgraded local git on Lion, now what?
Keys are usually kept in ~/.ssh. Your global Git config is usually in ~/.gitconfig. I've never heard of /usr/bin/.git, and /usr/bin isn't where I understood Homebrew installed things, so I'm not sure what's up there. Sorry!
Jun
10
revised Bash - read as a fallback to $@
added 126 characters in body
Jun
10
comment Bash - read as a fallback to $@
Yes. Instead of running read -ea lfiles in a while loop; just run that read command once. In a while loop, you'll keep reading lines until read returns non-0 (i.e. hits the end of input because of Ctrl-D). Without a while loop, you'll just read one line.
Jun
9
revised Bash - read as a fallback to $@
added 17 characters in body
Jun
9
revised Bash - read as a fallback to $@
added 10 characters in body
Jun
9
revised Bash - read as a fallback to $@
added 490 characters in body
Jun
9
comment Bash - read as a fallback to $@
This particular solution forces one filename per line. I'll add the on-the-same line solution as well, but it's dangerous in Mac OS X.
Jun
9
comment Bash - read as a fallback to $@
For this solution, the way to signal the end of stdin (so the program will continue) is to type Ctrl-D on its own line. This is a pretty common unix-ism - you may be familiar with this way of closing stdin if you've worked with the Python and Ruby interpreters, for example. It's not exactly intuitive, but the nice thing is it works perfectly with passing in the contents of a file as your stdin as well: myscript < filenames.txt.
Jun
9
revised How to reduce an image size in bytes without changing its resolution (size in pixels)?
added 235 characters in body
Jun
9
revised find command in Linux to locate pdf files
added 16 characters in body
Jun
9
comment find command in Linux to locate pdf files
This could be done in find directly if you wished, via -iregex: find ~ -iregex '.*\.pdf'. The problem is, in find the pattern is treated like it always has a ^ at the front and a $ at the back, so your pattern needs to be a bit more complicated. Also note: that . in your pattern is actually a single-character wildcard, not a literal period.
Jun
9
revised find command in Linux to locate pdf files
added 465 characters in body
Jun
9
revised How to find the index of a word in a string in bash?
added 193 characters in body
Jun
9
comment upgraded local git on Lion, now what?
Yes, but in my default PATH it's near the end. If there's a Git in /usr/bin it will win.
Jun
9
revised upgraded local git on Lion, now what?
added 7 characters in body
Jun
9
awarded  Editor
Jun
9
revised How to reduce an image size in bytes without changing its resolution (size in pixels)?
Make the link an actual link, for convenience.
Jun
9
suggested suggested edit on How to reduce an image size in bytes without changing its resolution (size in pixels)?