Script for changing a csv separator for all file into .zip archive.... - HP UX

This is a discussion on Script for changing a csv separator for all file into .zip archive.... - HP UX ; Hi, i need to make a sh script that find all .zip files in all subdirectories of a path, modify the .csv files inside the zip file, change the ',' separator into ';' and then save all files .csv and ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Script for changing a csv separator for all file into .zip archive....

  1. Script for changing a csv separator for all file into .zip archive....

    Hi, i need to make a sh script that find all .zip files in all
    subdirectories of a path, modify the .csv files inside the zip file,
    change the ',' separator into ';' and then save all files .csv and
    overwrite .zip files...any suggestions?
    many thanks


  2. Re: Script for changing a csv separator for all file into .zip archive....

    On 2006-07-10, drain wrote:

    > Hi, i need to make a sh script that find all .zip files in all
    > subdirectories of a path, modify the .csv files inside the zip file,
    > change the ',' separator into ';' and then save all files .csv and
    > overwrite .zip files...any suggestions?
    > many thanks


    Not really a HP question.

    If you've got the bottle you could post this to two competing language
    groups asking which is better for the task and if you're lucky someone
    will provide working code as an attempt at proving superiority.

    Don't forget to say whether quoted commas need to be handled too (i.e.
    left unchanged) and pre-existing semis need to be quoted. Have an answer
    ready for the people who say that the new files should be called .ssv
    instead of .csv .

    --
    Elvis Notargiacomo master AT barefaced DOT cheek
    http://www.notatla.org.uk/goen/
    One of my other 11 computers runs Minix.

  3. Re: Script for changing a csv separator for all file into .zip archive....


    all mail refused ha scritto:

    >
    > Not really a HP question.
    >
    > If you've got the bottle you could post this to two competing language
    > groups asking which is better for the task and if you're lucky someone
    > will provide working code as an attempt at proving superiority.
    >
    > Don't forget to say whether quoted commas need to be handled too (i.e.
    > left unchanged) and pre-existing semis need to be quoted. Have an answer
    > ready for the people who say that the new files should be called .ssv
    > instead of .csv .



    You'right, i thought to post here because the script should be run on
    an hp ux system, thanks for you're suggestions
    Regards


  4. Re: Script for changing a csv separator for all file into .zip archive....

    elvis-85383@notatla.org.uk wrote:
    : > i need to make a sh script that find all .zip files in all
    : > subdirectories of a path, modify the .csv files inside the zip file,
    : > change the ',' separator into ';' and then save all files .csv and
    : > overwrite .zip files...any suggestions?
    : > many thanks

    : Not really a HP question.

    Right. I would suggest using find, (with read or a for loop depending on
    how many) then unzip, then a for loop with either
    sed or awk, then zip.

    If you want some perl gurus, you ask on one ITRC forum:
    http://forums1.itrc.hp.com/service/f...categoryId=150

+ Reply to Thread