It's a strange requirement ,
first of all, main role are played by individual main groups and sub groups.
here in this example it's 2
and then how many sub groups are there under each main group
here e.g. for MIT there are 4 sub groups are present 1D_DATA_TYPE,10D_DATA_TYPE, STRESSED_1D_DATA_TYPE,STRESSED_10D_DATA_TYPE
similarly for ISS only one sub group is present i.e. CB_DATA_TYPE
so it will now check file 2 for values, I have mentioned index number for more readbility.
index counter always begin from nr.3 then it will check next sub-group, if it is same sub group as well as main group then it increase the index counter next one +1.
if it's new subgroup, then it will check the main group, if it's same then then index counter will increase by +2 from the previous one, and then it will again check for the next subgroup and taking consideration of previous main and sub group.
let say next sub group is a new sub group as well as a new main group then counter will increase by +3 from the previous one. same loop goes thru all over file 1 and corresponding index value will be printed.
e.g. STRESSED_10D_DATA_TYPE index counter is 13 ,
now checks for next sub group found that it's new sub group as well as new main group so the index counter increased to 16. (+3)
let say it found another same STRESSED_10D_DATA_TYPE sub group with same main group then next index would be 14 (+1)
then it encounters CB_DATA_TYPE index for ISS , index would be 17(+3) as previous one was 14.
let say it found another new sub group but main group reamins same, then index counter for that new sub group 15 (+2)
then it encounters CB_DATA_TYPE index for ISS , index would be 18(+3) as previous one was 15.
This rule applied for the whole file1 after the first line indexed.
how can I achieve this one???
have a look on different o/p on different scenario
Scenario 1 o/p scenario 2 o/p
Last edited by manas_ranjan; 03-30-2012 at 05:01 AM..
there are around 676 files in a directory and I want to batch every 10 and then remaining 7 files as well for a batch pressing job simultaneously.
I'm trying to pick-up every 10 counter'd files -- batch these files and then move on with the next batch.. after resetting the Counters back to 0;
... (5 Replies)
Hello :)
I am in this situation:
Input: two tab-delimited files, `File1` and `File2`. `File2` (`$2`) has to be parsed by patterns found in `File1` (`$1`).
Expected output: tab-delimited file, `File3`. `File3` has to contain the same rows as `File2`, plus the corresponding value in... (5 Replies)
Respected Members.
Hello.
This is my first post in the forum. I will try to follow all the rules as prescribed by the forum. In case of non-compliance, I request you to kindly give me some more time to understand and abide by them.
I am working on two files. I wish to merge the two files... (6 Replies)
Respected Members.
Hello.
This is my first post in the forum. I will try to follow all the rules as prescribed by the forum. In case of non-compliance, I request you to kindly give me some more time to understand and abide by them.
I am working on two files. I wish to merge the two files... (1 Reply)
Dear all,
I have a few files in a folder (lets say 5) and each have a few lines in them. I want to create merges of each of them with the other ones e.g.
I need the following merges
I tried to write a loop and started with combinations of 2, I get the write file names but for each... (17 Replies)
Hello All,
I have file a.txt
I want to add a counter loop at the end of each line in a file
ill explain:
i have a site h**p://test.test=Elite#1
i want to add a a counter to the number at the end of the file, that it will be like this
urlLink//test.test=Elite#1
urlLink//test.test=Elite#2... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The program is supposed to read in text from a given file ( different samples provided in the homework but not... (1 Reply)
Hi,
hope I am posting in the right section.
My problem is that I have 2 or more arguments passed and I want to check if the arguments passed exists or not.
The first argument should not exist and the remaining others should exist.
example:
./shells.sh argument1 argument2 argument3
... (5 Replies)
Hi there,
I'm trying to merge two files and make a third file.
However, two of the columns need to match exactly in both files AND I want everything from both files in the output if the two columns match in that row.
First file looks like this:
chr1 10001980 T A
Second... (12 Replies)
Hi,
Is there any way to merge two lines based on specific occurance of a character in a file.
I am having a flat file which contains multiple records.
Each row in the file should contain specified number of delimiter.
For a particular row , if the delimiter count is not matched with... (2 Replies)