上一页 1 ··· 150 151 152 153 154 155 156 157 158 ··· 491 下一页
摘要: 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)
摘要: jq Bash, unfortunately, doesn’t ship with a command that can work with JSON natively. In this lesson, we’ll learn how to read and do basic queries on 阅读全文
posted @ 2021-02-11 21:48 Zhentiw 阅读(64) 评论(0) 推荐(0)
摘要: Shell Parameter Exapnsion In this lesson, we'll see how shell parameter expansions can be used to simply expand a variable's valuable and also provide 阅读全文
posted @ 2021-02-11 21:31 Zhentiw 阅读(76) 评论(0) 推荐(0)
摘要: Shortcut For example we have a long command: curl -i http://example.com Ctrl + a Move to the beginning of the line Ctrl + e Move to the end of the lin 阅读全文
posted @ 2021-02-11 20:11 Zhentiw 阅读(88) 评论(0) 推荐(0)
摘要: !! & !& History expansions let you interact with bash's history. For example, if you forgot to run a command with sudo, you can sudo !! to rerun the l 阅读全文
posted @ 2021-02-11 20:02 Zhentiw 阅读(424) 评论(0) 推荐(0)
摘要: Copy Brace expansions are commonly used with the cp or mv commands in order to dynamically generate strings. In this lesson, we'll use a brace expansi 阅读全文
posted @ 2021-02-11 19:56 Zhentiw 阅读(95) 评论(0) 推荐(0)
上一页 1 ··· 150 151 152 153 154 155 156 157 158 ··· 491 下一页