The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl - SQLite question garric Shell Programming and Scripting 4 04-09-2008 08:51 AM
sqlite database in HP-UX vs Linux perlprg HP-UX 1 05-09-2007 02:56 AM
sqlite issue? brandan UNIX for Dummies Questions & Answers 0 07-23-2004 10:44 PM
rpm hell! knmwt15000 UNIX for Dummies Questions & Answers 7 03-27-2002 06:06 AM
negative UID/GID?!! I can see 'em but what the hell do they mean?! hellz UNIX for Dummies Questions & Answers 2 09-07-2001 03:18 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-20-2008
ogoy ogoy is offline
Registered User
  
 

Join Date: May 2008
Posts: 7
hell and sqlite

Hi everyone,

I have a requirement that requires me to fill an sqlite database with 100,000 entries (no duplicates).

I will start out by giving the command that will insert the values necessary to populate the database:

# sqlite /var/local/database/dblist "insert into list (owner_id,behavior,entry)

values(0,0,'newblacklistentry.com') "

The challenge would be to get a different output for the entry value 100,000 times!

We can start with newurl.com and maybe append a numerical character to the string e.g.

newurl1.com
newurl2.com
newurl3.com

* I'm running on Linux

Your thoughts?

Thanks for looking

Carlo
  #2 (permalink)  
Old 05-20-2008
scarfake scarfake is offline
Registered User
  
 

Join Date: May 2008
Posts: 43
try this:

Code:
#!/bin/sh
i=1
while [ $i -le 50 ]
do

sqlite /var/local/database/dblist "insert into list (owner_id,behavior,entry) values(0,0,'newblacklistentry$i.com') "

  i=`expr $i + 1`
done
if it works turn the value "50" to "100000" and let it roll
  #3 (permalink)  
Old 05-21-2008
ogoy ogoy is offline
Registered User
  
 

Join Date: May 2008
Posts: 7
Awesome! Works

Thanks scarfake That's how we roll!
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0