Created
December 14, 2012 10:56
-
-
Save myamamic/4284580 to your computer and use it in GitHub Desktop.
[script][DB] sqlite3 データベースにエントリをたくさん追加したときのスクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # sqlite3 データベースにエントリをたくさん追加したときのスクリプト | |
| # - これはmediatomb.dbに同じビデオコンテンツをたくさん追加している | |
| i=106 | |
| j=15 | |
| while [ $j -le 60 ]; | |
| do | |
| SENTENCE="INSERT INTO \"mt_cds_object\" VALUES($i,77,82,2,NULL,'1920x1080_1Mbps_60M_$j.mp4',NULL,NULL,NULL,NULL,NULL,0,'video/mp4',1,NULL,NULL);" | |
| echo $SENTENCE | |
| sqlite3 mediatomb.db "$SENTENCE" | |
| i=`expr $i + 1` | |
| j=`expr $j + 1` | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment