773 reputation
410
bio website
location
age
visits member for 2 years, 7 months
seen Mar 25 at 16:35

Sep
20
awarded  Yearling
Jul
16
awarded  Notable Question
Jul
8
awarded  Enlightened
Jul
8
awarded  Nice Answer
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