摘要: Schedule timed jobs on macOS with launchd launchd is a robust scheduled job automation tool on macOS that allows you to schedule a task to be run at r 阅读全文
posted @ 2021-02-12 20:40 Zhentiw 阅读(332) 评论(0) 推荐(0)
摘要: Getopts Let’s say you want to allow a user to pass a -v flag to turn on verbose logging in a script. Manually parsing out options passed to a script i 阅读全文
posted @ 2021-02-12 16:13 Zhentiw 阅读(47) 评论(0) 推荐(0)
摘要: Case Basic case "$1" in a) echo "a match";; b) echo "b match";; c) echo "c match" ;; *) echo "none of the case match" exit 1;; esac If we run: ./case_ 阅读全文
posted @ 2021-02-12 15:44 Zhentiw 阅读(78) 评论(0) 推荐(0)
摘要: Git hooks In root of project: mkdir -p hooks cd hooks touch post-merge post-merge: #! /bin/bash # all stdio in this script after this line will be sen 阅读全文
posted @ 2021-02-12 03:05 Zhentiw 阅读(60) 评论(0) 推荐(0)
摘要: In this lesson, we'll apply our jq skills and write a script that gets a list of dependencies from package.json and greps for usages of every package. 阅读全文
posted @ 2021-02-12 02:43 Zhentiw 阅读(60) 评论(0) 推荐(0)