-1
有一个小bash脚本如下有没有什么办法来显示,如果火柴盒
#!/bin/bash
C="Subsystem sftp /usr/libexec/openssh/sftp-server #### #### "
if [ "$D(`grep Subsystem /etc/ssh/sshd_config`)" == "$C" ]
then
echo "Entry is proper in sshd_config file"
else
echo " Entry present in conf file $D "
echo ""
echo -e "it should be \t\t\t$C "
fi
但输出类似如下
Entry present in conf file ($D--- is missing)
it should be Subsystem sftp /usr/libexec/openssh/sftp-server #### ####
的变量有什么办法来显示的$ d如果火柴盒?
您从未设置过$ D? – 123
我想你只是想像''$(grep Subsystem/etc/ssh/sshd_config)''执行grep。我不知道D在做什么 –
什么是“if火柴盒”? – Jens