I need help reading a txt file line by line, and then looping through each element in bash script. After hitting a element I need to cut the # of the column represented by the current numerical element, and then assign it to a file. In the end I need to paste all these files together. The columns are in a separate file. The first txt file reads as such

1,6,62,6

7,7,52,24

3,145,25,69

Then for example I need to cut column 5 in a separate file, and then assign to a new file. One the line is done the process starts again.This process would be easy in python or java, but I'm just very new to bash script.

This is a sample column:

1:45

1:56

1:56

1:69

ccData_t.nnv
while read line; do
cut -f2 ccData_t.nnv >p
for i in $(line);

Or is this a howto after all?
If it isn't, it isn't immediately obvious exactly what you're asking for help with. Could you clarify?_________________Do you know a good gtkdialog program? Please post a link here

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum