Results 1 to 5 of 5
Hello All,
I have a small problem that I would like to solve with C/C++ code.Currently, I am doing it with bash scripting, but it is slow for the application ...
- 04-26-2008 #1Just Joined!
- Join Date
- May 2007
- Posts
- 8
Eliminating data in the two files using tags..
Hello All,
I have a small problem that I would like to solve with C/C++ code.Currently, I am doing it with bash scripting, but it is slow for the application and does not always give desired results.
problem is :
file1
file 2:Code:>seq 1 agagugaiuididhiuhfdiuhfiu >seq 2 sfdesdfdsfsdfdsfsdfd >seq 3 hiodfhiodhfiodoijfdoj >seq 4 jfiodjiosfdiojfiodjojfsjd
Result after running the program:Code:>seq1 agagugai-u---ididhiu--hfdi--uhfiu >seq 2 sf-desdfdsf-s-dfd-sfs-dfd
i.e. The "tags" that are common in the two files are eliminated with their corresponding data and is stored in another file...Code:>seq 3 hiodfhiodhfiodoijfdoj >seq 4 jfiodjiosfdiojfiodjojfsjdo
To explain further :
By tag i mean ">seq2" etc. at the start of every data.
The objective is that 2 files are read and the tags which are in common b/w the 2 files along with it data will be eliminated. The new result is written in newfile.
forexample:
In the above example, file1 contains seq {1234} and file2 has seq {12}. Therefore the 2 tags common b/w 2 files are seq {12}, though the data is bit different. These 2 tags along with their data is eliminated and is written in a newfile.
Any help would be highly appreciable...
Thanks in Advance
- 04-27-2008 #2
Doing this in C or C++ is trivial. If you know C or C++, you can do this easily.
Do you have a specific C or C++ question that's getting in the way? We'd be glad to help with that!--
Bill
Old age and treachery will overcome youth and skill.
- 04-27-2008 #3Just Joined!
- Join Date
- May 2007
- Posts
- 8
Problem is that I am a newbie in C/C++ and i dont know how to do it...
- 04-27-2008 #4
You said that your bash script doesn't always give the desired results. The first thing would be to find that bug and fix it. Then the bash script would be a good "design document" to show what you want to do in C.
You've been working with C since, what, July of last year? If, after this half year, you're still not too familiar with C, then google this:
and you'll be on your way!Code:C tutorial
Good luck!--
Bill
Old age and treachery will overcome youth and skill.
- 04-27-2008 #5Just Joined!
- Join Date
- May 2007
- Posts
- 8
There is no need to be rude dear;


Reply With Quote