Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kmakita13714/3b8e8d4bf11eff27996e915f3e4608c3 to your computer and use it in GitHub Desktop.
Save kmakita13714/3b8e8d4bf11eff27996e915f3e4608c3 to your computer and use it in GitHub Desktop.
[便利なワンライナー・シリーズ] 3桁の数字のフォルダを作成するシェルスクリプト
for i in `seq -f %03g 1 371`; do mkdir $i; done
@kmakita13714
Copy link
Author

  1. 「-f %03g」でprintfのような書式を設定
  2. seqコマンドの引数「1」が始まりの数字
  3. seqコマンドの引数「371」が終わりの数字

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment