我看过这篇文章:sed delete remaining characters in line except first 5它帮助我删除x后的所有字符。但是,我很难找到如何删除x字符后的所有单词。 我开始使用此代码: echo "StackOverflow Users Are Brilliant And Hard Working" | sed 's/.//30g'
#character 30 -
我正在使用AIX 6.1。下面的代码对我来说工作得很好。 if [ "$HOSTNAME" = "host1" ]; then
echo "This is host1"
elif [ "$HOSTNAME" = "host2" ]; then
echo "This is host2"
else
echo "This is another host"
fi
但