The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Routes being automatically added Conutmonky UNIX for Dummies Questions & Answers 1 02-28-2008 04:13 PM
How come nothing is added to utmp in this case? frequency8 High Level Programming 1 07-01-2007 02:21 PM
New Person Added to the Forum wcarp05 Shell Programming and Scripting 1 04-13-2006 10:17 AM
How to scan only new lines added in file? redlotus72 UNIX for Dummies Questions & Answers 3 04-28-2005 12:34 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-17-2008
Registered User
 

Join Date: Apr 2006
Posts: 97
Unique value added

Guys,

I am trying to get unique numbers which i can use as a primary key in a table. I tried using the <seconds_since_epoch>.<hostname> combination but since more than one process can run on the same machine at the same time, this won't be unique either. Can anyone tell me another way to do this? Thanks.

Regards,
garric
Reply With Quote
Forum Sponsor
  #2  
Old 05-18-2008
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 736
<seconds_since_epoch>.<hostname>.<pid>
Reply With Quote
  #3  
Old 05-18-2008
Registered User
 

Join Date: Apr 2006
Posts: 97
Thanks.. that works
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0