4
4

More than 5 years have passed since last update.

コマンド3つでテスト用の画像を99枚保存する

Last updated at Posted at 2014-02-07

要 TextExpander curl rename

スクリーンショット 2014-02-07 19.26.02.png

ファイルが沢山できるので現在時刻のフォルダを作っておく

現在時刻のフォルダの作成 → 中に入る

# ;cmmakenow
mkdir NOW%Y%H%d%I%M%S

cd NOW%Y%H%d%I%M%S

画像のダウンロード (デフォだと.gif)

# ;placeimg

curl -O "http://placehold.it/%filltext:name=幅:width=4%x%filltext:name=高さ:width=4%&text=[01-%filltext:name=作成枚数%]"

このままだと拡張子もついていないファイル名なので、
ファイル名を一括リネーム

# ;rename

rename -x -e '$_ = "%filltext:name=名前%$N\.gif"' *text*

できたファイルはこんな感じ。

スクリーンショット 2014-02-09 1.07.00.png

スクリーンショット 2014-02-09 1.08.09.png

renameコマンドのインストール、解説は下記にまとめました。
http://qiita.com/GENYA/items/c3bdd6b187c2a9e40be1

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4