shell
weixin_43856912
这个作者很懒,什么都没留下…
展开
-
sed 基础
#!/bin/bash cat aaa a11b22c33 a11b22c33d44 a11b22c33d44e55 abc a11b22c33d44e55f66 abcd a11b22c33d44e55f66g77 a11b22c33d44e55f66g77h88 a11b22c33d44e55f66g77h88i99 https://www.baidu.com/123 a11b22c33 # 1.将每一行出现的第二个c替换成Q,注意:次操作会让所有行生效 sed 's/c/Q/2' aaa ...原创 2021-07-26 11:28:57 · 296 阅读 · 0 评论 -
用sheel xmllint --xpath模块进行xml解析
# 遍历整个代码仓下的"customization.xml" 和"customization_common.xml"文件,并执行以下操作 # 1.<build_desc config_git_path=xxxxxxxxxxxx>场景 grep -q " config_git_path" $1 if [ $? == 0 ]; then name=`xmllint --xpath "//build_desc/@config_git_path" $1 | awk -F '"' '{pr...原创 2021-07-20 15:34:51 · 1422 阅读 · 0 评论 -
sheel$1的值进行传递
download_command=$(eval echo "$"$1)原创 2021-07-20 14:32:34 · 92 阅读 · 0 评论 -
shell获取字符串第三个/后面的内容
[root@localhost ~]# aaa=http://migt-tm.ipd.com/config/chipset_component/Qcom/SM63755_config [root@localhost ~]# echo “$aaa” | cut -d ‘/’ -f 4- config/chipset_component/Qcom/SM63755_config原创 2021-07-16 20:05:15 · 967 阅读 · 0 评论