Results 1 to 4 of 4
hi all
i have a file.txt like this
AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 ...
- 10-18-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
help with script
hi all
i have a file.txt like this
i would like to write a script.AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 13869.14 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
AAAAA GGGGGG 27DE200 - - 5410.00 5125.00 5664.05 5265.00 694 1828.64 5143.90
AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 13869.14 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
AAAAA GGGGGG 27DE200 - - 5410.00 5125.00 5664.05 5265.00 694 1828.64 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
AAAAA GGGGGG 27DE200 - - 5410.00 5125.00 5664.05 5265.00 694 1828.64 5143.90
AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 13869.14 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
AAAAA GGGGGG 27DE200 - - 5410.00 5125.00 5664.05 5265.00 694 1828.64 5143.90
AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 13869.14 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
AAAAA GGGGGG 27DE200 - - 5410.00 5125.00 5664.05 5265.00 694 1828.64 5143.90
AAAAA GGGGGG 25OC200 - - 5389.80 5203.10 5673.15 5255.00 89085 234115.83 5143.90
AAAAA GGGGGG 29NO2007 - - 5389.00 5211.00 5674.00 5269.95 5265 13869.14 5143.90
BBBBBB GGGGGG 25OC200 CE 5600.00 74.00 15.00 168.60 34.05 810 2281.01 5143.90
initially it is a textfile containing morethan 10,000 lines...
first we have to get the number of line the text file contains,
i would like to put each line in an array
and the second thing is
from this array, i would like to put each word (means in a line there 12 words) in string.
is it possible.
please help me
thank you in advance"Relationships are built on trust and communication"
- 10-18-2007 #2
Judging from munna_dude's prior posts, I don't think this is homework. I think he's massaging data relating to commodities trading that he pulls off a web page.
Incidentally, it seems that he at least sometimes posts questions at several linux question forum websites or programming question websites to maximize the usefulness of his answer. This is fine for him, but it involves a drawback for those of us who provide answers.
If he asked his questions on just linuxforums, you could easily check if someone else has already answered his question before answering it yourself, thus saving yourself some unnecessary work. But if he's asking a question on several sites, he has several people unknowingly working on parallel, independent answers, possibly involving duplicate work.
To see this at work, find a distinctive phrase in one of his questions and google it. Be sure to put quotation marks around the phrase.
Results will not always show many entries. Take this very question, for example. When I googled the following phrase from the first entry in this thread:
Google found only one match. It wasn't from linuxforums; it was from forums.fedoraforum.org. So far the question hasn't received any responses there, but the question is only a couple of hours old as of when I write this.Code:"initially it is a textfile"
If you want to see where munna_dude seems to be going for his answers, google this:
I stopped answering his questions when I realized other people might be doing the same work in parallel.Code:munna_dude
- 10-18-2007 #3Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
hi..
is it wrong to know the information from masters in linux...by posting in deferent forums..
i am sorry for this...
reason for postings ...
at the beginig stage of using this forums...
i asked a querry in a forum...
waiting for couple of weeks ...
but nobudy giving the answer...
so the the same question asked in other forum..
so that, some times i may find the solution for the querry..
reason 2:
i think some people may not use some forums, but a little users may use all the forums...
for those i am giving my querry, and clarifying my doubts..
is it wrong..
in my opinion, all the linux forums are not same and users also...
if all linux forums are same
why the people creating this forums websites..
you are indirectly saying that, to people dont give him answer....
if any thing is wrong please forgive me ...
but onething i wud like to say is i will post querry in all the linux forums( which i know at present) , if the people know the answer or solution they may give...
SHARE YOUR KNOWLEDGE TO IMPROVE ( YOUR KNOWLEDGE) OTHERS
any how thank you for your repay for my post..."Relationships are built on trust and communication"
- 10-18-2007 #4
munna_dude, there's nothing immoral or unethical in what you are doing.
From the viewpoint of someone who's inclined to post a useful reply, though, there remains the difficulty (because you use more than one forum) of determining whether someone else has already answered this question. This tempts a potential answerer to wonder whether it's worth his time.
Many people will continue to answer your questions, despite this complication. I hope they do. But they should do this aware of the tradeoffs on the use of their time.
Best wishes in your exploration of Linux.


Reply With Quote
