Discuss on Reddit, Lobsters, and Hacker News. Summary I am thrilled to introduce Hypershell, a modular, type-level domain-specific language (DSL) for writing shell-script-like programs in Rust. Hypershell is powered by context-generic programming (CGP), which makes it possible for users to extend or modify both the language syntax and semantics. Table of Contents Estimated reading time: 1~2 hours
Mar 21, 2025 Many command line utilities support short form options (-f) and long form options (--force). Short form is for interactive usage. In scripts, use the long form. That is, in your terminal, type $ git switch -c my-new-branch In your release infrastructure script, write try shell.exec("git fetch origin --quiet", .{}); try shell.exec( "git switch --create release-{today} origin/main", .{
3 shell scripts to improve your writing, or "My Ph.D. advisor rewrote himself in bash." The hardest part of advising Ph.D. students is teaching them how to write. Fortunately, I've seen patterns emerge over the past couple years. So, I've decided to replace myself with a shell script. In particular, I've created shell scripts for catching three problems: abuse of the passive voice, weasel words, a
akinomyoga/ble.sh -- 87K lines (63K LoC w/o comments) in total. Bash Line Editor---fish-like interactive line editor in pure bash! The main file out/ble.sh has 39K lines (29K LoC), but there are 80K+ lines including module files in total. There are many comments (in Japanese). How Interactive Shells Work has a nice overview of how ble.sh works. It's very sophisticated, using bind -x to read raw by
I ran across two surprising sources of code execution in bash (and probably other shells) recently. In a historic context these probably weren't too serious of a problem, but in the context of CI systems where everything is a rats' nest of shell and YAML they could be useful execution primitives. Edit 2024-11-22: the Bash Pitfalls page in the Wooledge Bash Guide contains examples of these, among o
FreeBSD では 2024-05-31 に 200112 から 200809 への変更がようやく行われました(一度間違えて 200808 と書いてしまっていますが)。 https://cgit.freebsd.org/src/commit/?id=2e30926a68 https://cgit.freebsd.org/src/commit/?id=6e0278408e macOS は FreeBSD のユーザーランドのコマンドを使用しているため、そのせいで 200112 のままだった可能性も考えられますが、シェルやカーネルは FreeBSD のものではないため、FreeBSD が変更になったからと言って macOS が更新されるとは限らないでしょう。Solaris 10 と 11 ではディレクトリごとに準拠バージョンが異なるバイナリが配置されており以下のようになります。Solaris
Usage: ./dehydrated [-h] [command [argument]] [parameter [argument]] [parameter [argument]] ... Default command: help Commands: --version (-v) Print version information --display-terms Display current terms of service --register Register account key --account Update account contact information --cron (-c) Sign/renew non-existent/changed/expiring certificates. --signcsr (-s) path/to/csr.pem Sign a
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? はじめに そりゃまあ 30 年も経てば古くなりますよ。「入門UNIXシェルプログラミング」は今もシェルスクリプトに関するオススメの本として名前が挙がる名著です。しかしこの本は古い本です。POSIX でシェルが標準化される以前の本で、内容から判断するとおそらく 1990 年ぐらいの常識に基づいて書かれています。 古いから参考にならないと言うつもりはありません。しかしどれだけ優れた本でも時間の流れには勝てません。良書であると思っているからこそ、古くなってしまった内容は訂正する必要があると考えています。なおシェルスクリプトに関する古い本はこれ
One of the fun examples among all the copyright fuss is the extreme example of copyright claims made by AT&T some time in the 1980s. It's the /bin/true program. This is a "dummy" library program whose main function is to make it easy to write infinite loops (while true do ...) in shells scripts. The "true" program does nothing; it merely exits with a zero exit status. This can be done with an empt
会社の中でシェルスクリプトについての話をすることにしたので、このエントリはそのためのものです。 個人的な好みとかもいろいろ入ってしまっているので、そのあたりは取捨選択してください。 なぜ今シェルスクリプトを学ぶのか 公開されているSRE本をマルっとPDF化する SpotBugsのViolationレポートをMerge Requestのコメント投稿する ぼくの互換性についての考え方 何で書くか シェルスクリプトをうまく書くには ShellCheckを使う バッドパターンとその修正 line-by-lineの処理が多い lsを使う ls /directory | grep mystring ls | grep -v 'log$' lsの結果をループさせる 良いシェルスクリプトを書くためのTIPS set -euする 文字列は基本的にクオートする 局所変数にはlocalを使う 定数は読み取り専用
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く