Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想回显字符“=”直到行尾,而与 shell 脚本的终端窗口大小无关
我可以这样做:
echo -e "\e[1;35;40m =======================================================================================\e[0m"
但这只是一条随机线。我希望角色重复直到行尾。我怎样才能做到这一点?
for i in $(seq 1 $(stty size | cut -d' ' -f2)); do echo -n "=" done