help with script

This is a discussion on help with script within the Linux Programming forums, part of the Platform Specific Boards category; 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 ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    136

    help with script

    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 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
    i would like to write a script.
    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

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Yes, it's possible.

    Do you have any programming experience whatsoever? Have you tried this? What language do you want to use?
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Script in games
    By Shakti in forum Game Programming
    Replies: 7
    Last Post: 09-27-2006, 01:27 AM
  2. In a game Engine...
    By Shamino in forum Game Programming
    Replies: 28
    Last Post: 02-19-2006, 11:30 AM
  3. how to implementate a registration script
    By TJa in forum C++ Programming
    Replies: 0
    Last Post: 10-28-2005, 03:33 AM
  4. Passing arguments to script.....
    By suwie in forum C Programming
    Replies: 5
    Last Post: 09-26-2004, 12:10 AM
  5. Game structure, any thoughts?
    By Vorok in forum Game Programming
    Replies: 2
    Last Post: 06-07-2003, 02:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21