In Progress

Very Simple Script That Can Access A .csv File

I have a really simple task.

I have a CSV file with 2 columns: "picture-path" (the current name of a .jpg file) and "ID" (i.e., the future name of the jpg file). See below and the attached file.

I would like a script which does something very simple: it makes a copy of the file in “picture-path,” gives it the “ID” name, and outputs it (i.e. saves it) to a new folder (“davesfolder”). That’s it.

(For the sake of simplicity, I will keep the script, the picture files, and the CSV file all in the same folder.)

I’ve attached a sample CSV. Here is what it looks like:

Picture-path | ID

----------------------------------------------------------

[url removed, login to view] | Harley-Sissy-Bar

[url removed, login to view] | Yamaha-Sissy-Bar

[url removed, login to view] | Suzuki-Sissy-Bar

A successful script should do the following:

a) It makes a copy of "[url removed, login to view]," names it "Harley-Sissy-Bar.jpg" and outputs it (i.e. saves the copy) to “davesfolder”

b) It makes a copy of "[url removed, login to view]," names it "Yamaha-Sissy-Bar.jpg" and outputs it (i.e. saves the copy) to "davesfolder"

c) It makes a copy of "[url removed, login to view]," names it "Suzuki-Sissy-Bar.jpg" and outputs it to "davesfolder"

I don’t care what programming language you use. I just need something that is so simple to use that an idiot could do it. All the steps needed to run the script successfully should be explicitly spelled out so that your Grandmother could do it if she had to. (Please send back the script as a separate attachment)

IMPORTANT: I have a Macintosh Powerbook running OS X. The Mac has a UNIX bash shell. The successful script should be able to be run on the Macintosh OS X platform

Please ask all the questions you want if something is unclear

++++++++++

I did try writing a KSH script (unix scripting language) to do this task. It didn’t work. I’ll include the code below. Feel free to use it, or start from scratch. Again, I want something ridiculously easy to use.

Here is the old code for reference:

=========================

Below is the script I modified you spreadsheet slightly getting rid of all columns that had commas inbedded in the text in them you also may want to clip the first row from you spread sheet getting rid of the columns names and then resave it as a csv file again

name it [url removed, login to view] or edit the script which ever you prefer.

Uncoment to line with a # in the first column and you should be ready to go

run it like so

Name the script [url removed, login to view] give excute permission

like so you c

$ chmod 777 [url removed, login to view]

$ ./[url removed, login to view]

Any how below is the script you can run you can pipe the script to more if you want to see

everything it does

_________________________________________________________________

#!/bin/ksh

descriptivefolder=/davesfolder/

IFS=,

while read A descriptivename C D E F G H I J K L M N

do

tpn=`echo $J | sed s/http://`

echo "cp $tpn $descriptivefolder/$descriptivename"

#cp $tpn $discriptivename *** uncomment me when you are ready to run it fur sure

done < [url removed, login to view]

Skills: C Programming, Java, Javascript, Perl, Script Install

See more: ksh csv, ksh read csv file, script edit csv files, ksh csv files, you should be getting it, writing to a file in c, writing in script, writing a script, writing a programming language, writing a bash script, what programming language is this, what programming language, what is scratch programming, what is a programming language, what can you do with programming, unix programming language, the d programming language, spreadsheet script, simple programming language, shell programming language, script writing work, script programming, scratch programming language, programming on a mac, programming language d

About the Employer:
( 8 reviews ) Elk Grove, United States

Project ID: #204142

Awarded to:

gangabass

I can do this job for you. See PM for details.

$30 USD in 0 days
(181 Reviews)
6.1

7 freelancers are bidding on average $54 for this job

value4u

Hi, please see my PM. Thanks you.

$50 USD in 1 day
(51 Reviews)
6.3
codebuger

I ready to do this work for you.

$30 USD in 1 day
(3 Reviews)
5.8
eelance

it is easy to do .i can do that with php . in web application.

$45 USD in 1 day
(75 Reviews)
5.5
glyph

The task is very basic. Please see PM.

$30 USD in 0 days
(2 Reviews)
2.8
Sesidhar

let us know if your intrested

$100 USD in 10 days
(0 Reviews)
0.0
hskartono

hello sir, i prefer to use php for processing your csv file. yes, php running from the unix shell (not from web). please read my pmb for more detailed bid information. Thank you, Harry S. Kartono

$90 USD in 3 days
(1 Review)
0.0