Click to See Complete Forum and Search --> : assign unique number?
monkeyxxx
02-06-2006, 12:18 PM
Hi,
My assignment requires that I assign a unique number to every line in my file. Throughout the life of the program, a new line can be added to the file with its unique number, and old lines can be updated/deleted. My program is purely in bash.
Can someone please give me some ideas on how to do this?
ph34r
02-06-2006, 12:48 PM
Your unique number could be a time/date stamp of when the line was originally created. Check the output options for the date command
Choozo
02-06-2006, 02:38 PM
Seems like homework is a popular topic in these forums now?
bwkaz
02-06-2006, 08:07 PM
Well, spring semester did just start, and people are getting back to school. That probably has a lot to do with it.
(Seriously, people: ASK YOUR PROFESSOR/TEACHER/WHOEVER, NOT US!)
monkeyxxx
02-07-2006, 06:06 PM
sorry people...didn't know that. so what kind of questions should I post in here???
soulestream
02-07-2006, 06:13 PM
you are welcome to post anything linux related, as long as its follow posting guidelines, and your are not getting graded for it. ;)
soule
ph34r
02-07-2006, 06:23 PM
And if you are getting graded on it, we want credit(s) too...
/slowly working towards that BS, one post at a time
bwkaz
02-07-2006, 08:14 PM
Well, in this sub-forum, programming-related, not Linux-related. ;) I don't mind an occasional Windows programming question (for instance), as long as it doesn't get to the point where those overwhelm the other stuff.
(I wonder if we should add an explicit ask-your-professor-about-your-homework clause to the AUP or the forum description or something. Hmm...)