2020年7月8日

适用于Bash编程初学者小例子 - 第二篇

摘要: 去掉字符串前面的一个或多个空格。#!/bin/bashstr="f810yunlong-3: Cache flushing complete. "IFS=':' read -ra substrs <<< "$str"NODE="${substrs[0]}"MSG="${substrs[1]}"TRIM_MSG= echo "$MSG" | sed -e 's/^[[:space:... 阅读全文

posted @ 2020-07-08 13:27 中道学友 阅读(199) 评论(0) 推荐(0) 编辑

导航

技术追求准确,态度积极向上