无法执行命令 /usr/bin/bash

Could not execute command /usr/bin/bash

我正在尝试使用 here:

方法在我的 xmobar 上显示音量
    Config { font = "xft:Ubuntu Mono:pixelsize=16:antialias=true:hinting=true"
            , borderColor = "black"
            , border = TopB
            , bgColor = "black"
            , fgColor = "grey"
            , position = TopP 0 0
            , commands = [ 
                    Run Date "%a %_d.%_m  %H:%M" "date" 10
                    , Run StdinReader
                    , Run Com "/usr/bin/bash" ["-c", "~/.config/xmobar/get-volume.sh"]  "myvolume" 1
            ]
            , sepChar = "%"
            , alignSep = "}{"
            , template = "<fc=#FFF>%StdinReader%</fc>}{<fc=#FFF>%date%</fc> -- %myvolume%"
            }

但我没有显示音量,而是在我的 xmobar 中收到此消息:

Could not execute command /usr/bin/bash

我尝试用 /bin/bashbash 替换 /usr/bin/bash 但结果相同

有人知道问题出在哪里吗?

当我在终端中 运行 时,它工作正常:

$ bash ~/.config/xmobar/get-volume.sh 
Vol: 16%

$type bash 的输出是

bash is hashed (/usr/bin/bash)


grep -3i execv sux 之后 strace -s <PID> -fp -o sux

的结果
98743 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98743
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9)                          = 0
98743 <... execve resumed>)             = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC)     = 0
98743 brk(NULL <unfinished ...>
97272 close(11 <unfinished ...>
--
98744 dup2(11, 2)                       = 2
98744 close(11)                         = 0
98744 close(10)                         = 0
98744 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98744
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98744 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98744 brk(NULL <unfinished ...>
--
98745 dup2(11, 2)                       = 2
98745 close(11)                         = 0
98745 close(10)                         = 0
98745 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98745
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98745 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98745 brk(NULL <unfinished ...>
--
98746 dup2(11, 2)                       = 2
98746 close(11)                         = 0
98746 close(10)                         = 0
98746 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98746
97272 close(6)                          = 0
98746 <... execve resumed>)             = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98746 brk(NULL <unfinished ...>
97272 close(9 <unfinished ...>
--
98747 dup2(11, 2)                       = 2
98747 close(11)                         = 0
98747 close(10)                         = 0
98747 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98747
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98747 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98747 brk(NULL <unfinished ...>
--
98748 dup2(11, 2)                       = 2
98748 close(11)                         = 0
98748 close(10)                         = 0
98748 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98748
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98748 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98748 brk(NULL <unfinished ...>
--
98749 dup2(11, 2)                       = 2
98749 close(11)                         = 0
98749 close(10)                         = 0
98749 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98749
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98749 <... execve resumed>)             = 0
97272 close(9)                          = 0
98749 brk(NULL <unfinished ...>
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
--
98750 dup2(11, 2)                       = 2
98750 close(11)                         = 0
98750 close(10)                         = 0
98750 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98750
97272 close(6)                          = 0
98750 <... execve resumed>)             = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98750 brk(NULL <unfinished ...>
97272 close(9 <unfinished ...>
--
98751 dup2(11, 2)                       = 2
98751 close(11)                         = 0
98751 close(10)                         = 0
98751 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98751
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98751 <... execve resumed>)             = 0
97272 close(9)                          = 0
98751 brk(NULL <unfinished ...>
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
--
98752 dup2(11, 2)                       = 2
98752 close(11)                         = 0
98752 close(10)                         = 0
98752 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98752
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98752 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9)                          = 0
98752 brk(NULL <unfinished ...>
--
98753 dup2(11, 2)                       = 2
98753 close(11)                         = 0
98753 close(10)                         = 0
98753 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98753
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98753 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98753 brk(NULL <unfinished ...>
--
98754 dup2(11, 2)                       = 2
98754 close(11)                         = 0
98754 close(10)                         = 0
98754 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98754
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98754 <... execve resumed>)             = 0
97272 close(9)                          = 0
98754 brk(NULL <unfinished ...>
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
--
98755 dup2(11, 2)                       = 2
98755 close(11)                         = 0
98755 close(10)                         = 0
98755 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98755
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98755 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98755 brk(NULL <unfinished ...>
--
98756 dup2(11, 2)                       = 2
98756 close(11)                         = 0
98756 close(10)                         = 0
98756 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98756
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98756 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98756 brk(NULL <unfinished ...>
--
98757 dup2(11, 2)                       = 2
98757 close(11)                         = 0
98757 close(10)                         = 0
98757 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98757
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98757 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98757 brk(NULL <unfinished ...>
--
98758 dup2(11, 2)                       = 2
98758 close(11)                         = 0
98758 close(10)                         = 0
98758 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98758
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98758 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98758 brk(NULL <unfinished ...>
--
98759 dup2(11, 2)                       = 2
98759 close(11)                         = 0
98759 close(10)                         = 0
98759 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98759
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98759 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98759 brk(NULL <unfinished ...>
--
98760 dup2(11, 2)                       = 2
98760 close(11)                         = 0
98760 close(10)                         = 0
98760 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98760
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98760 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98760 brk(NULL <unfinished ...>
--
98761 dup2(11, 2)                       = 2
98761 close(11)                         = 0
98761 close(10)                         = 0
98761 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98761
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98761 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98761 brk(NULL <unfinished ...>
--
98762 dup2(11, 2)                       = 2
98762 close(11)                         = 0
98762 close(10)                         = 0
98762 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98762
97272 close(6)                          = 0
98762 <... execve resumed>)             = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98762 brk(NULL <unfinished ...>
97272 close(9 <unfinished ...>
--
98763 dup2(11, 2)                       = 2
98763 close(11)                         = 0
98763 close(10)                         = 0
98763 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98763
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98763 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98763 brk(NULL <unfinished ...>
--
98764 dup2(11, 2)                       = 2
98764 close(11)                         = 0
98764 close(10)                         = 0
98764 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98764
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98764 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98764 brk(NULL <unfinished ...>
--
98765 dup2(11, 2)                       = 2
98765 close(11)                         = 0
98765 close(10)                         = 0
98765 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98765
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98765 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98765 brk(NULL <unfinished ...>
--
98766 dup2(11, 2)                       = 2
98766 close(11)                         = 0
98766 close(10)                         = 0
98766 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98766
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98766 <... execve resumed>)             = 0
97272 close(9)                          = 0
98766 brk(NULL <unfinished ...>
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
--
98767 dup2(11, 2)                       = 2
98767 close(11)                         = 0
98767 close(10)                         = 0
98767 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98767
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98767 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9)                          = 0
98767 brk(NULL <unfinished ...>
--
98768 dup2(11, 2)                       = 2
98768 close(11)                         = 0
98768 close(10)                         = 0
98768 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98768
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98768 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98768 brk(NULL <unfinished ...>
--
98769 dup2(11, 2)                       = 2
98769 close(11)                         = 0
98769 close(10)                         = 0
98769 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98769
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98769 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC)     = 0
98769 brk(NULL <unfinished ...>
--
98770 dup2(11, 2)                       = 2
98770 close(11)                         = 0
98770 close(10)                         = 0
98770 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98770
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98770 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98770 brk(NULL <unfinished ...>
--
98771 dup2(11, 2)                       = 2
98771 close(11)                         = 0
98771 close(10)                         = 0
98771 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98771
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98771 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98771 brk(NULL <unfinished ...>
--
98772 dup2(11, 2)                       = 2
98772 close(11)                         = 0
98772 close(10)                         = 0
98772 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98772
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98772 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98772 brk(NULL <unfinished ...>
--
98773 dup2(11, 2)                       = 2
98773 close(11)                         = 0
98773 close(10)                         = 0
98773 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98773
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9)                          = 0
98773 <... execve resumed>)             = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC)     = 0
97272 close(11 <unfinished ...>
98773 brk(NULL <unfinished ...>
--
98774 dup2(11, 2)                       = 2
98774 close(11)                         = 0
98774 close(10)                         = 0
98774 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98774
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98774 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(11)                         = 0
98774 brk(NULL <unfinished ...>
--
98775 dup2(11, 2)                       = 2
98775 close(11)                         = 0
98775 close(10)                         = 0
98775 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98775
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98775 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98775 brk(NULL <unfinished ...>
--
98776 dup2(11, 2)                       = 2
98776 close(11)                         = 0
98776 close(10)                         = 0
98776 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98776
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98776 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC)     = 0
98776 brk(NULL <unfinished ...>
--
98777 dup2(11, 2)                       = 2
98777 close(11)                         = 0
98777 close(10)                         = 0
98777 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98777
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
97272 close(9 <unfinished ...>
98777 <... execve resumed>)             = 0
97272 <... close resumed>)              = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98777 brk(NULL <unfinished ...>
--
98778 dup2(11, 2)                       = 2
98778 close(11)                         = 0
98778 close(10)                         = 0
98778 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98778
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98778 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9)                          = 0
98778 brk(NULL <unfinished ...>
--
98779 dup2(11, 2)                       = 2
98779 close(11)                         = 0
98779 close(10)                         = 0
98779 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98779
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC)     = 0
98779 <... execve resumed>)             = 0
97272 close(9)                          = 0
97272 fcntl(8, F_SETFD, FD_CLOEXEC <unfinished ...>
98779 brk(NULL <unfinished ...>
--
98780 dup2(11, 2)                       = 2
98780 close(11)                         = 0
98780 close(10)                         = 0
98780 execve("/bin/bash", ["/bin/bash", "~/.config/xmobar/get-volume.sh"], 0x7fff9c760fc0 /* 45 vars */ <unfinished ...>
97272 <... vfork resumed>)              = 98780
97272 close(6)                          = 0
97272 fcntl(7, F_SETFD, FD_CLOEXEC <unfinished ...>
98780 <... execve resumed>)             = 0
97272 <... fcntl resumed>)              = 0
97272 close(9 <unfinished ...>
98780 brk(NULL <unfinished ...>

波浪号通过调用 shell 替换为适当的目录(当波浪号作为源代码的一部分出现在未引用的上下文中时,shell 正在执行)。这里没有调用shell,只有一个被调用;波浪号是数据,不是语法。

所以改变...

"~/.config/xmobar/get-volume.sh"

至:

"/home/youraccount/.config/xmobar/get-volume.sh"

...,至:

"-c", ". ~/.config/xmobar/get-volume.sh"

(这使得 -c 之后的参数被解析为 shell 语法,其中 ~ 需要替换)。