niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » HP-UX
Script for changing a csv separator for all file into .zip archive....
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Dennis Handly
*nix forums beginner


Joined: 28 Jun 2005
Posts: 38

PostPosted: Sat Jul 15, 2006 8:30 am    Post subject: Re: Script for changing a csv separator for all file into .zip archive.... Reply with quote

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/forums/categoryhome.do?admit=-682735245+1152948032760+28353475&categoryId=150
Back to top
drain
*nix forums beginner


Joined: 10 Jul 2006
Posts: 2

PostPosted: Mon Jul 10, 2006 5:52 pm    Post subject: Re: Script for changing a csv separator for all file into .zip archive.... Reply with quote

all mail refused ha scritto:

Quote:

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 Smile
Regards
Back to top
all mail refused
*nix forums beginner


Joined: 21 Feb 2005
Posts: 38

PostPosted: Mon Jul 10, 2006 5:29 pm    Post subject: Re: Script for changing a csv separator for all file into .zip archive.... Reply with quote

On 2006-07-10, drain <spremuta@gmail.com> wrote:

Quote:
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.
Back to top
drain
*nix forums beginner


Joined: 10 Jul 2006
Posts: 2

PostPosted: Mon Jul 10, 2006 3:47 pm    Post subject: Script for changing a csv separator for all file into .zip archive.... Reply with quote

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
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 2:43 am | All times are GMT
navigation Forum index » *nix » HP-UX
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Changing postfix's 600 chmod wdave Postfix 1 Mon Apr 14, 2008 1:23 am
No new posts Running php file everyday on scheduled time sachin PHP 1 Fri Jul 21, 2006 12:49 pm
No new posts Regarding thesaurus iso file Srikanth modules 0 Fri Jul 21, 2006 10:42 am
No new posts changing port in vsftp henk@oegema.com Suse 2 Fri Jul 21, 2006 10:42 am
No new posts does squid 2.6 support setting cache_peer port in redirec... Victor Tsang Squid 0 Fri Jul 21, 2006 8:16 am

Jokes | Credit Card Debt Consolidation | Loans | Bad Credit Mortgages | Loans
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3784s ][ Queries: 20 (0.2965s) ][ GZIP on - Debug on ]