Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- array=(ST SR SP TV DJ XD SV PC)
- arrsize=${#array[*]}
- for i in `seq 1 100`;
- do
- regnr=$(((i%90000)+10000))
- arraynr=$((i%arrsize))
- t=`date -d "$((RANDOM%1+2010))-$((RANDOM%12+1))-$((RANDOM%28+1)) $((RANDOM%23+1)):$((RANDOM%59+1)):$((RANDOM%59+1))" '+%d-%m-%Y %H:%M:%S'`
- echo "${array[$arraynr]}$regnr',$t,$i" >> testdata.sql
- #echo "INSERT INTO tabell (regno,passTime stationID) VALUES ('${array[$arraynr]}$regnr',$t,$i);" >> testdata.sql
- done
Add Comment
Please, Sign In to add comment