121 reputation
4
bio website beesbuzz.biz
location Seattle, WA
age 36
visits member for 3 years, 1 month
seen Oct 29 at 0:05

Software engineer, freelance artist/musician/tinkerer


Sep
5
suggested rejected edit on Remove all files/directories except for one file
Jul
28
comment Is `-` used only with cd?
For some of the directory-handling builtins like pushd, yes. Otherwise, the meaning of "the previous directory" is not a terribly useful default.
Jul
28
comment Is `-` used only with cd?
Something to keep in mind is that cd is a builtin, not an external command (nor would it have any way of even working as one). cd - is thus a shell-level feature.
May
1
awarded  Teacher
Apr
30
awarded  Editor
Apr
30
comment How to securely automate running commands as root with “sudo su -”?
I knew that, but I brainfarted when I wrote the answer. Fixed, and also expanded a bit on what I meant by "wrapper," thanks.
Apr
30
revised How to securely automate running commands as root with “sudo su -”?
added 104 characters in body
Apr
29
answered How to securely automate running commands as root with “sudo su -”?
Apr
29
awarded  Supporter
Jan
17
answered What are the advantages of the Unix file system structure
Jan
17
comment What are the advantages of the Unix file system structure
The data-and-executable separation argument is complete nonsense. File system organization is for a human's benefit; it's not like there's some physical separation between the bits that prevents them from giving cooties to each other or anything. UNIX's security is historically better because of a stronger, more-tightly-enforced permissions model in general.
Jun
1
comment How do you set an environment variable?
That's distribution-specific and generally not useful for the sort of thing the OP was asking about.
Jun
1
comment How do you set an environment variable?
Also in sh-derivatives you can do export YOURVARIABLE=/path/to/file as a single step, and don't forget that you can do YOURVARIABLE=/path/to/file ./someCommand to have the variable only affect that single command invocation.
Jan
22
comment Randomly draw a certain number of lines from a data file
Unfortunately, sort -R appears to only be in some versions of sort (probably the gnu version). For other platforms I wrote a tool called 'randline' which does nothing but randomize stdin. It's at beesbuzz.biz/code for anyone who needs it. (I tend to shuffle file contents quite a lot.)
Nov
21
awarded  Autobiographer
Nov
21
comment When is xargs needed?
It constructs it internally and uses execvp, so it's safe. Also, GNU xargs (as used on Linux and a few others) lets you specify newline as your delimiter with -d \n, although BSD xargs (OSX et al) does not appear to support this option.
Apr
28
answered How do I create a virtual secondary screen in X11?