摘要:
$# 传递到脚本的参数个数 $$ 脚本运行的当前进程PID $! 最后一个运行的后台进程PID $- 当前Shell选项 #!/bin/sh echo "Num of arguments: $#" echo "Current PID: $$" echo "The last deforegroud P 阅读全文
posted @ 2020-09-24 19:34
ascertain
阅读(132)
评论(0)
推荐(0)
摘要:
访问api查询数据,返回的json中有中文,利用json.tool格式化,发现中文以'\u4e09'这种Unicode编码显示 查找json的tool模块 find / -iname tool.py json.dump方法增加参数,即让json.tool模块不强行保证json的内容都转为ASCII编 阅读全文
posted @ 2020-09-24 16:25
ascertain
阅读(1167)
评论(0)
推荐(0)
摘要:
引用数组中所有元素时${arr[*]}和${arr[@]}是有细微区别的 Example: #!/bin/sh function showarr(){ arr=$1 for b in ${arr[*]};do echo $b done return 0 } regions=('aa pp' 'bb' 阅读全文
posted @ 2020-09-24 14:43
ascertain
阅读(3797)
评论(0)
推荐(0)

浙公网安备 33010602011771号