66,291 reputation
864147
bio website
location European Union
age
visits member for 1 years, 8 months
seen 1 hour ago

5h
comment How is it that I can attach strace to a process that isn't in the output of ps?
That's a thread. Use ps -L. See also strace -f to strace all the threads in that process (and future children)
5h
comment Why not use “which”? What to use then?
@user62251, I agree it's a mess as currently written, I'll try and rewrite it at some point.
5h
comment Is there an alternative to the `which` command?
See also Why not use “which”? What to use then?
5h
comment Is there an alternative to the `which` command?
type and command -V/v are standard (Unix, LSB, but optional in POSIX (XSI), type -p and type -t are not.
6h
comment Bash Function Decorator
I don't follow you there. My answer is an attempt as a close map of what I understand python decorators to be
7h
comment Check that only root can edit a script before executing it
You also need to check all the path components for write access only to root.
7h
comment Bash Function Decorator
You need a different context otherwise you wouldn't be able to catch the inner's return.
7h
comment Bash Function Decorator
@mikeserv, eval "_inner_$(typeset -f x)" creates _inner_x as an exact copy of the original x (same as functions[_inner_x]=$functions[x] in zsh).
8h
revised SED : Case Match Pattern Replacement
update for when replacement is shorted than search string. Reuse string to change case of the rest
8h
comment Comment multiple line using SED
Note that neither -r nor \| are standard/portable. -r is GNU specific.
10h
comment Different forms of executing a shell script
It's sh < scriptname that's the problem.
14h
awarded  Enlightened
14h
awarded  Nice Answer
14h
revised How to know my server's time offset?
-d implies -u
14h
answered How to know my server's time offset?
14h
reviewed Leave Open X11 module ABI version does not match server's version
14h
reviewed Leave Open Comment multiple line using SED
15h
revised Convert the permissions in `ls -l` output to octal
added 66 characters in body
15h
revised Convert the permissions in `ls -l` output to octal
added 32 characters in body
15h
revised Convert the permissions in `ls -l` output to octal
added 4 characters in body