2022-01-01から1ヶ月間の記事一覧

`zsh`で`eval`する

evalとは eval [ arg ... ] Read the arguments as input to the shell and execute the resulting command(s) in the current shell process. The return status is the same as if the commands had been executed directly by the shell; if there are no…

`echo`と`printf`では制御文字の扱いが異なる件

ffmpegで気づいたこと ffmpegでは-headersオプションを使えば複数のhttp headerを付与しつつ-iで指定したurlに向かってhttpで叩けるが,複数の内容を利用する際には改行するための制御文字を間々で認識させる必要があるらしく,その場合は$'...'で表せる. n…

自作のzshスクリプトでzparseoptsを用いてコマンドラインオプションを解析したい

目標 その都度に設定ファイルを指定するタイプのスクリプト(homebrewで入れたmarp-cliとか)の実行をより便利にしたい コマンドライン(CL)オプション(OPT)を使いたい(marpならば--pdfの有無で出力をhtmlかpdfで切り替えられる) 具体的には その引数を…