Closed jrz233 closed 1 year ago
可以提供一下执行 which tmux
之后的返回值吗?($?
)
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊
我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入 $?
并回车来查看
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入
$?
并回车来查看
这样吗
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入
$?
并回车来查看这样吗
对的,为了方便复现可以再像如下所描述的提供一下 bash
的版本号吗?
从图中我大概了解了原因,但是还需要了解一下环境。
nemo@nemo-tablet-14c /tmp> bash --version
GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入
$?
并回车来查看这样吗
对的,为了方便复现可以再像如下所描述的提供一下
bash
的版本号吗?从图中我大概了解了原因,但是还需要了解一下环境。
nemo@nemo-tablet-14c /tmp> bash --version GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
root@8d3d27d0ad2b:/# bash --version GNU bash,版本 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc.
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入
$?
并回车来查看这样吗
对的,为了方便复现可以再像如下所描述的提供一下
bash
的版本号吗? 从图中我大概了解了原因,但是还需要了解一下环境。nemo@nemo-tablet-14c /tmp> bash --version GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
root@8d3d27d0ad2b:/# bash --version GNU bash,版本 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc.
将 if [[ $? -eq 0 ]]
改为 if [ -x tmux ]
,并删去 which tmux
那一行试试?
你的 bash
或是环境中缺少 [[
,修改为 POSIX 兼容的写法应该能解决问题。
你们的 越来越多了!
可以提供一下执行
which tmux
之后的返回值吗?($?
) 执行which tmux就是返回那个tmux地址啊我指的是这条命令的 exit status,你可以在执行 which 这条命令后再在 shell 中输入
$?
并回车来查看这样吗
对的,为了方便复现可以再像如下所描述的提供一下
bash
的版本号吗? 从图中我大概了解了原因,但是还需要了解一下环境。nemo@nemo-tablet-14c /tmp> bash --version GNU bash, version 5.1.4(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software; you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
root@8d3d27d0ad2b:/# bash --version GNU bash,版本 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc.
将
if [[ $? -eq 0 ]]
改为if [ -x tmux ]
,并删去which tmux
那一行试试?你的
bash
或是环境中缺少[[
,修改为 POSIX 兼容的写法应该能解决问题。
不行,还是提示找不到tmux,脚本如下
不行,还是提示找不到tmux,脚本如下
要不直接把第一行的 shebang 改成 #!/bin/bash
?我自己机器上 sh
bash
好像都可以的……
或者直接 bash ./启动.sh
试试?
以及:如果可以的话能否贴个这个情况下的输出(报错)?
PS: 可以直接通过我个人主页中的邮箱联系到我
结论:在给定条件(ubuntu:20.04)镜像中无法复现,此 issue 被搁置