ccostring 07052000

ccostring is a text utility to compare lines from different files.
ccostring is a text utility to compare lines from different files. The ccostring project is designed to handle a particular scheme used in naming mp3 files.

Start from the begin of the line ( line(1) ) and read to the first '-' in the line. Then it do the same with the other line ( line(2) ). After that it compare the to strings, if the are equal it print the line, else it read to the next '-' in the line(2) and compare them. If it finders nothing, it read to the next '-' in line(1) and start over with line(2). If nothings was found it print nothing.

Examples:

line(1) = "Karl Martin - Sitting here.mp3" from Input file
line(2) = "Lene Martin - Sitting down here.mp3" from Datebase file

ccostring read to the first '-' in line(1) and put into (char) line1[20]
but it doesn't put ' ' into line1[20] so line1[20] will look like this

line1[20] = "KarlMartin"

Then it read to first '-' in line(2) and put into (char) line1[20]
but it doesn't put ' ' into line2[20] so line2[20] will look like this

line2[20] = "LeneMartin"

Then we compare the two arrays, but the are not equal, so we read to the next '-' in line(2)
It stops when it meat a '.' so line2[20] will now look like this

line2[20] = "Sittingdownhere"

Then we compare the two arrays again, but the are still not equal and it was the last word in line(2) so we read to the next '-' in line1 and put into line1[20], It also stop when it meat a '.'

line1[20] = "Sittinghere"

Then we start over with line(2), when it's don, ccostring read the next line i Database fil and put into line(2).

line(2) = "Karl Martin - Drive buy.mp3" Nr. 2 line in Database file

Start over Read to '-' in line(1) and line(2) and put it into line1[20] and line2[20]

line1[20] = "KarlMartin"
line2[20] = "KarlMartin"

Then we compare the two arrays and the are equal so we return 1 (true) and ccostring print it out and we read the next line in the Database fil. When we meat EOF in the datefile, we read the next line in the Input fil. And start over

line(1) = "Aqua - Around the world.mp3"

Installation:

You have to be root to install the program

[cowhead@cowhead]$ su


Then trip make to compile the scoure code

[cowhead@cowhead]$ make


Use make install to install the binary

[cowhead@cowhead]$ make install

If nothing goes wrong, you ccostring successful installed on you system. Now you can call ccostring use ccostring -h for help

[cowhead@cowhead]$ ccostring -h

last updated on:
January 24th, 2008, 15:01 GMT
price:
FREE!
homepage:
home10.inet.tele.dk
license type:
GPL (GNU General Public License) 
developed by:
Jeppe Sorensen
category:
ROOT \ Utilities
ccostring
Download Button

In a hurry? Add it to your Download Basket!

user rating 5

2.4/5
 

0/5

Rate it!

Add your review!

SUBMIT