Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-19-2005, 03:36 PM
Jeff W Jeff W is offline
Member
 
Join Date: May 2004
Posts: 85
Default I want to save 1 image to X image files with different names.

I know this is kind of a strange question, but I'm hoping someone can help me out:

I want to save 1 image to X image files with different names and I have the list of names in a comma separated form: A.bmp, B.bmp, C.bmp, etc

I can change the list to a different form through liberal of grep if necessary. i.e. I can get it into the form "A.bmp" "B.bmp"...etc

I need to do this twice. Once for a bitmap and once for a jpeg.

Thanks.
Reply With Quote
  #2  
Old 12-19-2005, 04:16 PM
jba jba is offline
Senior Member
 
Join Date: Feb 2005
Posts: 672
Default Re: I want to save 1 image to X image files with different names.

try this

awk '{split($0,names,","); for (i in names){printf "cp image.bmp %s;\n", names[ i ]}}' < names.txt

edit: the ubb code is screwing it up -- the "names[ i ]" part you need to take out the spaces
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.