添加公钥
#!/bin/bash name="$(whoami)" path="$(getent passwd | cut -d: -f6 | grep $name)" echo $path # 当前用户的公钥的路径 rsaPub="${path}/.ssh/id_rsa.pub" pubContent="$(cat $rsaPub)" # https://superuser.com/qu...
#!/bin/bash name="$(whoami)" path="$(getent passwd | cut -d: -f6 | grep $name)" echo $path # 当前用户的公钥的路径 rsaPub="${path}/.ssh/id_rsa.pub" pubContent="$(cat $rsaPub)" # https://superuser.com/qu...
概述 如何在shell中处理异常 立即捕获 Automatic exit from Bash shell script on error [duplicate] set -e 任何后续的脚本,一旦存在错误, 会立马退出 #!/bin/bash set -e # Any subsequent(*) commands which fail will cause the she...
概述 如何在shell中处理异常 立即捕获 Automatic exit from Bash shell script on error [duplicate] set -e 任何后续的脚本,一旦存在错误, 会立马退出 #!/bin/bash set -e # Any subsequent(*) commands which fail will cause the she...
rc.local 20220401 报错解决:the input device is not a TTY Shell 变量没解析成功及解决方法 before How to run scripts on start up? How to run scripts on start up? rc.local No /etc/rc.local file on Ubuntu 18.04...
restart wifi #!/bin/sh ifconfig enp0s20f0u14 down ifconfig enp0s20f0u13 down echo "downed" ifconfig enp0s20f0u14 up ifconfig enp0s20f0u13 up echo "uped" dhclient enp0s20f0u14 dhclient enp0s20f0u13 ...
route add sudo ip route add 10.0.0.0/8 via 10.61.64.1 sudo ip route add 100.64.0.0/10 via 10.61.64.1 sudo ip route add 127.0.0.0/8 via 10.61.64.1 sudo ip route add 172.16.0.0/12 via 10.61.64.1 su...
mysql表结构转成golang的结构体 mysql数据库转 struct 工具,可以将mysql数据库自动生成golang sturct结构,带大驼峰命名规则。 带json标签
建立文件服务器 python2 python -m SimpleHTTPServer 8888 python3 python -m http.server 复制成功
同步github和gitbook内容 怎样将github和gitbook绑定起来 选择所有的项目, 选择单个项目 当gitbook中的内容更新 -> github代码更新 -> gitbook的在线文稿预览更新
中文文档 至少需要一个 README 和 SUMMARY 文件来构建一本书。