381 reputation
113
bio website arp242.net
location Eindhoven, Netherlands
age 29
visits member for 1 year, 11 months
seen 2 days ago

Programmer of stuff. Also something of a UNIX addict. You can check out my code projects at http://code.arp242.net and http://github.com/Carpetsmoker.

If you feel the need to contact me in private, you can email me at martin@arp242.net.


2d
comment readlink -f not working on multiple files
Note that readlink isn't POSIX, for example on OSX readlink -f won't work (I happened to find this out the other day, I always thought that readlink was POSIX, for some reason).
2d
revised readlink -f not working on multiple files
deleted 121 characters in body
Jan
17
comment csh: Get rid of job+PID when forking
I thought this question looked familiar; and you asked a similar question the other day... What are you trying to achieve here? I suspect you're using the wrong solution to sole a problem you haven't described (ie. XY problem). You should describe the problem you're trying to solve... Making code work in both bourne shell and the C shell is impossible, since they're only superficially the same & very different.
Jan
17
comment csh: Get rid of job+PID when forking
@OleTange What? sh is pretty much guaranteed to be on the system. You can't write scripts that behave exactly the same in bourne shell & the C shell, since they're only superficially the same... I don't see how this is not 'guaranteed that the command will work in sh' ...
Jan
17
revised csh: Get rid of job+PID when forking
This question is about tcsh, since csh lacks these features
Jan
17
answered csh: Get rid of job+PID when forking
Jan
17
suggested approved edit on csh: Get rid of job+PID when forking
Jan
16
comment When is it important to write portable scripts?
I feel it's always good to point about that it's a bash specific feature, and not portable, just as I would point out that a GNU specific extension is being used for some utility (even though the question was tagged as Linux). I've never seen anyone say "this is a bashism and you should never use it".
Jan
16
comment Disable colours at runtime in xterm
@DannyStaple How is ls different than $anything_else? ls outputs ANSI color codes, and I want xterm to ignore this ... Or am I missing something? If I start xterm -cm, ls is without colours...
Jan
16
asked Disable colours at runtime in xterm
Jan
16
accepted Why does 'find -exec cmd {} +' need to end in '{} +'?
Jan
16
comment Compatibility scripting: Save $? for use later
So, what are you trying to do? This sounds like a case of the XY problem; perhaps with a description of your goal someone can find a solution (what you want to do there is nigh-impossible).
Jan
15
comment Compatibility scripting: Save $? for use later
You forgot fish :-) ... The problem is that variable assignment is different for sh/csh/fish, and it's not easy to make this compatible (using test or any other commands will never work, since that will reset $?)... I'm not sure what you're trying to do here, why don't you just execute your script with /bin/sh or whatever? ... The only option is to create separate scrips.
Jan
15
revised Why does 'find -exec cmd {} +' need to end in '{} +'?
Add preface since not everyone seems to have read & understood the entire question...
Jan
15
revised Why does 'find -exec cmd {} +' need to end in '{} +'?
added 1 character in body
Jan
15
asked Why does 'find -exec cmd {} +' need to end in '{} +'?
Jan
12
comment readlink -f not working on multiple files
@JigarGandhi You can get a binary (or compile one) and drop it in ~/bin, and add that to your $PATH. You don't need to install it system-wide.
Jan
12
answered readlink -f not working on multiple files
Jan
1
comment How to kill a runaway cat?
@muru Thanks. I tried to test it, but wasn't able to reproduce the problem (my system is too fast, it would seem, or maybe I didn't try hard enough).
Jan
1
comment How to kill a runaway cat?
You also try stopping output with Ctrl+S which sends tty-stop-output. You can then send Ctrl+C. To resume output, press Ctrl+Q ...