Redirect stderr to stdout in C shell

The csh shell has never been known for its extensive ability to manipulate file handles in the redirection process. You can redirect both standard output and error to a file with: xxx >& filename but that’s not quite what you were after, redirecting standard error to the current standard output. However, if your underlying operating … Read more

Maximum length of command line argument that can be passed to SQL*Plus?

Try with: xargs –show-limits </dev/null Your environment variables take up 2446 bytes POSIX upper limit on argument length (this system): 2092658 POSIX smallest allowable upper limit on argument length (all systems): 4096 Maximum length of command we could actually use: 2090212 Size of command buffer we are actually using: 131072 There is no limit per … Read more

Edit shell script while it’s running

It does affect, at least bash in my environment, but in very unpleasant way. See these codes. First a.sh: #!/bin/sh echo “First echo” read y echo “$y” echo “That’s all.” b.sh: #!/bin/sh echo “First echo” read y echo “Inserted” echo “$y” # echo “That’s all.” Do $ cp a.sh run.sh $ ./run.sh $ # open … Read more

Setting stacksize in a python script

I have good experience with the following code. It doesn’t require any special user permissions: import resource, sys resource.setrlimit(resource.RLIMIT_STACK, (2**29,-1)) sys.setrecursionlimit(10**6) It does however not seem to work with pypy. If resource.setrlimit doesn’t work, you can also try using threads: sys.setrecursionlimit(10**6) import threading threading.stack_size(2**26) threading.Thread(target=main).start()