1,284 reputation
516
bio website smith-li.com
location Philadelphia, PA
age 36
visits member for 3 years, 9 months
seen Dec 19 at 17:12

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.


Sep
22
awarded  Notable Question
Aug
26
comment Delete all files in a directory whose name do not match a line in a file list
@CristianCiupitu echo can be misleading. The echo before the rm shows what would really happen. The first echo was redundant, so I removed it.
Aug
26
revised Delete all files in a directory whose name do not match a line in a file list
Remove the redundant echo
Aug
26
comment Delete all files in a directory whose name do not match a line in a file list
@davidva Under what circumstances? Any time you automate deleting things you run the risk of making a mistake, but within the parameters of the question I think my demo proves this approach is sound.
Aug
26
comment Delete all files in a directory whose name do not match a line in a file list
@CristianCiupitu doesn't it? I added a demo showing that it deals very well with whitespace.
Aug
26
revised Delete all files in a directory whose name do not match a line in a file list
Some naysayers in the comments. Give them a demo
Aug
7
comment Which is more efficient, ls or ls -l?
It doesn't matter which is more efficient, because efficiency only matters in automation and, since ls is not intended for automation, there are always more efficient and safer ways to illuminate the filesystem for programming purposes.
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.