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

17h
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)
17h
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.
17h
comment Is there an alternative to the `which` command?
See also Why not use “which”? What to use then?
17h
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.
18h
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
19h
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.
19h
comment Bash Function Decorator
You need a different context otherwise you wouldn't be able to catch the inner's return.
19h
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).
20h
revised SED : Case Match Pattern Replacement
update for when replacement is shorted than search string. Reuse string to change case of the rest
20h
comment Comment multiple line using SED
Note that neither -r nor \| are standard/portable. -r is GNU specific.
22h
comment Different forms of executing a shell script
It's sh < scriptname that's the problem.
1d
awarded  Enlightened
1d
awarded  Nice Answer
1d
revised How to know my server's time offset?
-d implies -u
1d
answered How to know my server's time offset?
1d
reviewed Leave Open X11 module ABI version does not match server's version
1d
reviewed Leave Open Comment multiple line using SED
1d
revised Convert the permissions in `ls -l` output to octal
added 66 characters in body
1d
revised Convert the permissions in `ls -l` output to octal
added 32 characters in body
1d
revised Convert the permissions in `ls -l` output to octal
added 4 characters in body