Reputation
144,047
Next tag badge:
1008/1000 score
194/200 answers
Badges
21 206 385
Impact
~7.2m people reached

Jan
13
revised How to implement “generators” like $RANDOM?
added 791 characters in body
Jan
13
revised How to implement “generators” like $RANDOM?
added 569 characters in body
Jan
13
comment How to implement “generators” like $RANDOM?
@CharlesDuffy, you can have more than one coprocess in zsh. coprocesses have only been very recently added to bash, see the bash section at that link.
Jan
13
comment How to implement “generators” like $RANDOM?
@kjo, see edit.
Jan
13
revised How to implement “generators” like $RANDOM?
added 686 characters in body
Jan
13
awarded  Nice Answer
Jan
12
answered How to implement “generators” like $RANDOM?
Jan
12
revised dirname and basename vs parameter expansion
Solaris has switched to a POSIX shell at last for sh in Solaris 11.
Jan
12
revised dirname and basename vs parameter expansion
added 8 characters in body
Jan
12
answered How many processes can listen on a specific port?
Jan
12
comment convert table to ini file using bash arrays
@Wildcard, it matters for the expansions of "$*" or "${array[*]}". I didn't put it first on purpose though.
Jan
12
revised convert table to ini file using bash arrays
added 98 characters in body
Jan
12
revised convert table to ini file using bash arrays
added 65 characters in body
Jan
12
revised convert table to ini file using bash arrays
added 571 characters in body
Jan
12
revised convert table to ini file using bash arrays
with bash and in the global context, you need to unset a variable before declaring in case it was imported from the environment. Removed unreliable echo usage
Jan
12
answered convert table to ini file using bash arrays
Jan
12
comment How many processes can listen on a specific port?
You can have several processes listening on the same protocol:address:port as long as it's on file descriptors sharing the same open file descriptions (like children inheriting fds, or fds passed with SCM_RIGHTS).
Jan
12
comment What is the difference between &6 and /dev/fd/6?
Also related: OS X, bash: less works on open file descriptors, cat doesn't
Jan
12
revised What is the difference between &6 and /dev/fd/6?
only Linux has that problem
Jan
12
comment Background processes in ksh script are disappearing after they are kicked off
A difference between running something in background in an interactive shell (at the prompt) and running something in background in a non-interactive shell (like a script) is that something's stdin will be /dev/null in the non-interactive case (some nohup implementations also do that). I'd run those scripts with ksh -x and check the logs.