1,234 reputation
416
bio website smith-li.com
location Philadelphia, PA
age 35
visits member for 3 years, 4 months
seen Jul 25 at 11:25

Pythonista; Celerista; Pyramista; Plonista; Magentoasta; Javascriptista; CSSista; HTMLista; Webista; Shellista; you get the gista.

I am an employee of eBay Inc. The opinions expressed here are my own and do not necessarily reflect the opinions of eBay Inc. This is my personal StackExchange account.

Classic disclaimer.


Jul
24
awarded  Popular Question
Jul
2
awarded  Curious
May
20
awarded  Nice Answer
May
20
revised If processes inherit the parent's environment, why do we need export?
Combine first two sentences into one
May
19
comment Difference between cat and '>' to zero out a file
OK, but it's no less deserving of inclusion than cp /dev/null file, right?
May
19
comment Difference between cat and '>' to zero out a file
What about dd of=file count=0?
May
19
revised If processes inherit the parent's environment, why do we need export?
added 256 characters in body
May
19
revised If processes inherit the parent's environment, why do we need export?
added 531 characters in body
May
19
answered If processes inherit the parent's environment, why do we need export?
May
19
comment Difference between cat and '>' to zero out a file
Truncate is nice when you want to truncate a file to something other than 0. That said, even without a shell is a strange statement: can you describe a context where truncate would be available, but neither > nor unistd C libraries would be available?
May
19
comment Difference between cat and '>' to zero out a file
The colon command is defined in POSIX. It is a null operation that exists to expand commandline args.
May
19
awarded  Popular Question
May
5
comment Is there a more succinct alternative to piping to wc for counting files in a directory
@l0b0 I was trying to explain what Chris Down said more succinctly. The ARG_MAX restriction is an error given by the exec family of functions – it's not a feature of the shell per se, any any command that doesn't exec would not suffer from the limitation. Shell builtins are the most common example of commands that take arguments but don't exec.
May
1
comment Is there a more succinct alternative to piping to wc for counting files in a directory
@l0b0 I don't think set will fail under these circumstances, since we're not actually doing an exec. To wit, on my system, getconf ARG_MAX yields 262144, but if I do test_arg_max() { set -- {1..262145}; echo $#; }; test_arg_max, it happily replies 262145.
Apr
30
answered Delete all files in a directory whose name do not match a line in a file list
Apr
29
comment Have backticks (i.e. `cmd`) in *sh shells been deprecated?
@slm note, though, that (unlike gotos) use of backticks will not cause you to be eaten by raptors. Unless you nest them.
Apr
19
comment What is the point of the `cd` external command?
I guess that makes these systems not strictly POSIX. Just like everyone else. :)
Apr
3
comment What is the correct name for the “>” command
@HaukeLaging noclobber isn't just a bashism. It's part of POSIX
Mar
31
awarded  Popular Question
Mar
28
answered How can I identify lines in files over a certain length