Exit 2 nohup sh step1.L353.HaplotypeCaller.sh > L353.log 2>&1
时间: 2024-04-23 12:29:15 浏览: 23
这是一个命令行命令,其中 `nohup` 是一个用于在后台运行脚本的命令,`sh step1.L353.HaplotypeCaller.sh` 是要运行的脚本命令,`> L353.log 2>&1` 是将脚本的输出重定向到 `L353.log` 文件中,并且将错误输出也重定向到同一个文件中。
这个命令的作用是在后台运行名为 `step1.L353.HaplotypeCaller.sh` 的脚本,并将输出和错误信息都记录到 `L353.log` 文件中。
相关问题
nohup sh 123.sh 1 >/dev/null 2>&1 &
&1 &
This command runs the shell script "123.sh" with an argument of "1" in the background using "nohup" (no hang-up), redirects standard output to "/dev/null" (to discard any output), and redirects standard error to standard output (to avoid separating error messages from the standard output). The "&" symbol at the end is used to run the command in the background, allowing you to continue using the terminal.
The purpose of "nohup" is to allow a process to continue running even if the terminal session is ended. The standard output and error streams are redirected to "/dev/null" to discard any output that the script might generate.
In summary, this command runs the shell script "123.sh" in the background, discards any output, and merges standard error with standard output, making it convenient for long-running processes.
nohup test.sh 2>1& > /dev/null &
您好!您的第一个问题是关于使用 nohup 命令运行 test.sh 脚本的具体命令。根据您提供的命令,您想要将脚本的错误输出定向到标准输出,并将标准输出重定向到 /dev/null,并在后台运行脚本。
正确的命令应该是:
```shell
nohup test.sh > /dev/null 2>&1 &
```
这个命令中,`> /dev/null` 将标准输出重定向到 /dev/null,而 `2>&1` 将标准错误输出重定向到标准输出,从而将错误输出也重定向到 /dev/null。最后的 `&` 符号将脚本在后台运行。
这样,通过上述命令运行 test.sh 脚本时,既不会在终端输出任何结果,也不会将错误信息显示出来,并且脚本会在后台一直运行。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)