use the nohup command without getting nohup out + sql tip

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/wangbingfengf98/article/details/101799492
  • command tip

we can combine file descriptors together: 2>&1 means "send standard error wherever standard output is going". That means that we get a single stream of output that includes both standard out and standard error intermixed with no way to separate them anymore, but it also means that we can include standard error in a pipe.

So the sequence >/dev/null 2>&1 means "send standard output to /dev/null" (which is a special device that just throws away whatever we write to it) "and then send standard error to wherever standard output is going" (which we just made sure was /dev/null). Basically, "throw away whatever this command writes to either file descriptor"

for more info, you'd better read 1 reference.

  • mysql tip

a. Temporary tables only works in your curent open session.

b. in join sql, we can use >= operator

select 
  id, 
  substring_index(
    substring_index(email_recipients, ',', n), 
    ',', 
    -1
  ) as email
from dashboards
join numbers
  on char_length(email_recipients) 
    - char_length(replace(email_recipients, ',', '')) 
    >= n - 1

references:

1. https://stackoverflow.com/questions/10408816/how-do-i-use-the-nohup-command-without-getting-nohup-out

2. https://www.periscopedata.com/blog/splitting-comma-separated-values-in-mysql

猜你喜欢

转载自blog.csdn.net/wangbingfengf98/article/details/101799492