まず最初にmac printfとしてマニュアルを確認してみましょう。macOS (Ventura13.5,zsh) の場合、以下のようになります。ChatGPTや検索して出てくる結果などを参考にするのも構いませんが、まずはざっと目をマニュアルに目を通しておくと良いでしょう。 man printf 整 ...
まず、ファイル内にある数値データをフォーマットして出力してみましょう。printfはパラメーターにファイルパスを指定できないため、xargsを使ってファイルの内容を渡すことにします。 ここでは1.txtというテキストファイルを用意しました。1行に1つの整 ...
「printfer」は、C言語の“printf()”関数およびC#言語の“String.Format()”メソッドの出力結果を手軽にチェックできるソフト。Windows Vistaに対応するフリーソフトで、編集部にてWindows 7でも動作を確認した。作者のWebサイトからダウンロード可能で、動作には.NET ...
When you have a width specification of 1 (like you do in the second line) the output will be H or T. If you have anything else, the output will be HEADS or TAILS. But first, we need to add the %H ...
In my last article, "Fancy Tricks for Changing Numberic Base", I explored the surprising ability of the Linux shell to convert numeric bases on the fly, including this sweet little snippet that ...