2011/12/14

shellで適当にCSVを作る(while, od, /dev/random, shasum, cut, expr)

こないだも同じようなの書きましたけども
$ i=30;while [ $i -ne 0 ] ; do ; echo `od -vAn -N1 -tu4 < /dev/random`','`head /dev/urandom | shasum | cut -f 1 -d " "` ; i=`expr $i - 1` ;done
143,7ed6cdfacce9c8180f084f11ff40a487fb9b76cc
172,e8868853fbf06a59d54a80af5d326ee923f5c2a5
20,aa6964527830642d0487d8c91ee729acd596d2c6
16,39653698b5f44272b9323175142c6f697b0b56e5
147,58d0a5b4f8ba2b6b232b3d880b012dbc5c8f7003
124,4b29452a6ceed3bc5cbc5646f89b8d059f35142c
77,79d318be8be409b772f5bc084119816e1d8a7b3d
5,830c44e27e2541f5b3cb93dfad07a35121f19d4a
29,e822b1cd62a150c6f33f5db764e2ea4a684e79d2
90,d32f9c0a7b84f2cdd9621ed8a9265cd95a56c263
65,fd244f7b6c689510e4b5ddf12871497c74fdc499
189,1731b1bf3a5376880b36dc95ec1e7f7195648e20
137,79b3c453d5157bd39d27cd5ce543f652f9b3bcaf
28,9ed7b27b2f119e9d5b90807c8eb95871d2b41f9b
45,52e2a699499889ea4f8c6840ab968f8c56fd3811
148,ff29ed9a549e9252e230321d2aa620850aa1f88f
162,baecf2ff043644044b8ed901e70283a645990d4f
169,9b1d410a6a7e1b3babfe4ccbbef0aa769bad9bf7
117,16d548cb175ccf8e992ed69ec1d43940a15bda85
127,ca7533638cd1cb09d774d3515d4298842c912a93
203,80431c1c5296af45c7974d07ae2aea803167a395
5,0488e6326128587a7a0f8fa071120b78752dacbf
102,c3882ba4b20a38f34cb08b96bd7cec22a0cf47a7
161,9efe9a3c9a9f46fc928ef077123dc3ae188f6973
9,cd5c6555c08ddf3a81b8a682b65a7de3adb25cd4
132,7abe72b0e1341a5b4b24b06dcc75fbc2615fa3c7
229,5ee1c7255d38acbe446e8a30bcf6ddcefd8615bb
193,228f6cdab6ae3d276a1b4b543ca39cf93f499a5f
188,f6b215b5202d7342f7c310402dffedaf349fcbce
54,6e2490ea175f1e4ea009e441fccabe08d2d8c0c7


入門UNIXシェルプログラミング―シェルの基礎から学ぶUNIXの世界

0 件のコメント:

コメントを投稿