I have a CSV file, comma delineated. I need to move the file, listed in column 3 into the folder listed in column 12. I output both columns to different text files using:
awk -F ',' '{print $3}' /Users/amermels/Documents/MERGED/Sling\ Manifest\ 2-17-2017.csv > ../files.txt
awk -F ',' '{print $12}' /Users/amermels/Documents/MERGED/Sling\ Manifest\ 2-17-2017.csv > ../dates.txt
Then I tried:
for IX in 'ls' ; do mv -i `cat ../files.txt` `cat ../dates.txt` ; done
But it just doesn't work that way.
I'm sure this would be simple if I was more than a novice, but I just can't figure this out.
Example:
192543,FYI,BuyingTheView_SunsetCondoToronto_192543_SLING.xml,1_27_17 16:32,"2,299",,Yes,2017-01-30,2017-03-05,1_30_17,3_5_17
BuyingTheView_SunsetCondoToronto_192543_SLING.xml
is the file and 3_5_17
is the folder.
NOTE: I used single quote ' instead of tick in my post due to the formatting of the page.
Comments
Post a Comment