698 reputation
19
bio website
location
age
visits member for 1 year, 8 months
seen Apr 29 at 20:55
stats profile views 31

Jan
2
awarded  Popular Question
Oct
21
answered Syntax errors in a bash script executed from tcsh
Oct
21
comment Syntax errors in a bash script executed from tcsh
So the problem is with single quotes you used to wrap your whole commands. It prevents back-quotes to be replaced with its result. Try this: bash -c "for i in 1 2; do if [ 146 = `echo $numbers | cut -f$i -d' ' ` ]; then echo 'NUM is OK '; fi done"
Oct
21
awarded  Commentator
Oct
21
comment Syntax errors in a bash script executed from tcsh
try "146" == instead of 146 =
Sep
20
awarded  Yearling
Sep
19
comment Why there are only two user defined signals?
@Random832 You're right, I know what you say. But the problem I was thinking about was that what if I ran out of my 31 choices of signals?
Sep
19
accepted Why there are only two user defined signals?
Sep
19
comment Why there are only two user defined signals?
Thanks. In my case I handle SIGUSR1 for reconfiguration. It means when the admin wants to change the configuration of my running process, it changes the config file and sends a SIGUSR1 to my PID (easier to use a pipe here). And I use SIGUSR2 for clean process shutdown. It hadn't got necessary for me to use a signal other than these two, but some runtime features could be implemented by handling other user defined signals!
Sep
19
asked Why there are only two user defined signals?
Sep
11
comment Concatenate lines by first column (AWK or SED)
where did uuu line come from (in the output)?
Jul
25
suggested suggested edit on
Jul
25
suggested suggested edit on
Jul
25
comment Ansi escape code in VIM
unfortunately it does not support some escape codes, like high intensity foreground color!
Jul
23
awarded  Scholar
Jul
23
accepted Ansi escape code in VIM
Jul
23
comment Ansi escape code in VIM
Thanks, it works. I used the v2 version and Text is colored. Maybe I use another script to suppress the ANSI characters (if I don't want to use the conceal patch).
Jul
23
asked Ansi escape code in VIM
Jun
5
answered Get ssh to forward signals
Jun
2
comment Using in/out named pipes for a TCP connection
@noffle because, as I said, netcat will close whenever one of its network connections closes. If you close the client (which sends a string and receives the same string), netcat server will be closed too. I wrote a server code for myself in this case that forks itself to handle multiple clients and reconnect of clients.