I'm currently trying to write a shell script at work that would loop and allow me to enter the date, and the ad number of a PDF file, that would then copy that ad into a designated file and I can't get it to run correctly
heres the code:
#! /bin/bash year=`date +%Y` month=`date +%m` monthname=`date +%B` day=`date +%d` hotfolder=`expr $day + 2` open "/Volumes/ _Issues/$year/$month $monthname/$hotfolder/" echo "Enter the DATE of the PDF you wish to Copy"; while read inputline do copydate="$inputline" echo "you entered $copydate"; if [ "$copydate" -ge 1 ] then echo "You entered $copydate" fi while read inputline2 do copynum=$inputline2; done
right now I need to drag and drop multiple files from a few folders, into one folder, I would like to be able to have it go along the lines of...
Enter date for the ad:
Enter number for the ad:
then i would like it to copy ad number 107548*pdf from the 22nd folder, into the hotfolder.
thanks in advance,