07-21-2006
maintaining the sequence number
Thanks for the help. I would love to use the ksh only method, but I have to maintain the sequence number across multiple files.
ex:
file1:
field1|field2|1|field3...
field1|field2|2|field3...
file2, which will be generated on the following day:
field1|field2|3|field3...
field1|field2|4|field3...
These sequence numbers must remain unique to the records across files so we can keep track of them. They will be sent to a vendor and they will send them back at a later time. The boss wants to use an Oracle sequence to maintain uniqueness across all records sent out. Any ideas?
TIA
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I 've to add the two statements to some java files:
setValid(false); // the call should be after the openeing curly brackets
return true; // the "return true" before the closing curly brackets
Input:
boolean isValid() {
. . .
}
Output:
boolean isValid() {
... (8 Replies)
Discussion started by: andy2000
8 Replies
2. Shell Programming and Scripting
Can someone please help.
I need to add a sequence number to the start of each line of a file.
It needs to be 6 characters long. ie 000001 next line starts 000002 etc. (4 Replies)
Discussion started by: Dolph
4 Replies
3. Shell Programming and Scripting
I have a file name -HRCFTSIN05PLA1602100430444444
my requirement is to split the file in 10000 count each file and to add sequence number.rch at the end of each file.
output should be in this format
HRCFTSIN05PLA160210043044444401.rch
HRCFTSIN05PLA160210043044444402.rch... (4 Replies)
Discussion started by: abhigrkist
4 Replies
4. Shell Programming and Scripting
How do I add the sequence number to the file? I have a file seperated by commas.
appusage,243,jsdgh,798
appusage,876,0989,900
.
.
appusage,82374,ajfgdh,9284
The output would be as below
1,appusage,243,jsdgh,798
2,appusage,876,0989,900
.
.
100,appusage,876,0989,900 (5 Replies)
Discussion started by: smee
5 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I need to create a script which checks for a particular file for eg.kumar1.txt.
If kumar1.txt is already exist the script should increment the file name as kumar2.txt and so on.
Please Advise.
Thanks & Regards,
Kumar66 (2 Replies)
Discussion started by: kumar66
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have to append 2 files and while appending i need to add a running sequence number (counter ) for each line at the first column.
For e.g. If file x contains details as below.
Tom
Dick
Harry
Charlie
and file y contains
Boston
Newyork
LA
Toledo
Then the new file should... (1 Reply)
Discussion started by: kalyansid
1 Replies
7. Shell Programming and Scripting
Hi all, I hope someone can help me write a script that:
Reads the xml file which holds Dolphins "Places" in KDE.
If a specific tag is not there, it should create a set for it, in order.
so this little file lives in
~/.kde/share/apps/kfileplaces/bookmark.xml
Here is my example.
<?xml... (3 Replies)
Discussion started by: CtrlKey
3 Replies
8. Shell Programming and Scripting
I have a report file which somewhere has a lines starting with word ".sub"
I have a new variable named $new.
What i am trying to do is insert the content of $new just before the occurrence of ".sub" in the report file.
How can I do that? (11 Replies)
Discussion started by: animesharma
11 Replies
9. Shell Programming and Scripting
Hi guys,
Does anyone know how to get a string of sequence from other file? Should I use awk? Please see below. Thanks!
LIST_FILE:
>NAME1
>NAME3
>NAME5
>NAME7
>NAME8
SEQ_FILE:
>NAME1 LEN75
100100101001010001010
>NAME2 LEN90
111010101010101101101
>NAME3 LEN27
101000101001010010101... (5 Replies)
Discussion started by: narachaid
5 Replies
10. Shell Programming and Scripting
Hi All ,
I have a file which contains data(comma separated) in below format :
500,Sourav ,kolkata ,8745775020,700091
505,ram,delhi ,9875645874,600032
510 ,madhu ,mumbai ,5698756430 ,500042
515 ,ramesh ,blore ,8769045601 ,400092
I want to add unique sequence number at the start of each... (7 Replies)
Discussion started by: STCET22
7 Replies