- 用户:xcq
- 密码:xiechengqi
- 新建用户:xie
xie
密码:xiechengqi
$ echo -e 'xiechengqi/nxiechengqi/nxiechengqi/n' | sudo -S ls &> /dev/null && sudo useradd xie && echo 'xie:xiechengqi' | sudo chpasswd
- 用户:xcq
- 密码:xiechengqi
- 其他用户:xie
xie
修改后密码:xiechengqi
echo -e 'xiechengqi/nxiechengqi/nxiechengqi/n' | sudo -S ls &> /dev/null && echo 'xie:xiechengqi' | sudo chpasswd
${!string*}
或${!string@}
返回所有匹配给定字符串 string 的变量名
$ echo ${!H*}
HADOOP_HOME HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTSIZE HOME HOSTNAME HOSTTYPE
$ echo .[!.]*
.git .github .gitignore .nojekyll
${#字符串}
str="hello world!"
${#str}
12:未找到命令
$ curl -s https://api.github.com/users/<username>/repos?per_page=1000 | grep git_url | awk '{print $2}' | sed 's/"\(.*\)",/\1/'
$ curl -s "https://api.github.com/users/<username>/repos?per_page=1000" | jq '.[].git_url'
$ curl -s "https://api.github.com/users/<username>/repos?per_page=1000" | python <(echo "import json,sys;v=json.load(sys.stdin);for i in v:; print(i['git_url']);" | tr ';' '\n')
$ curl -s https://api.github.com/users/<username>/repos?per_page=1000 | grep -oP '(?<="git_url": ").*(?="\,)'
$ ss -plunt
$ apt list --upgradable | grep -v 'Listing...' | cut -d/ -f1 | tr '\r\n' ' ' | sed '$s/ $/\n/'