skelly16 0 Light Poster

Hi Script Masters

Im new to scripting and having trouble to get this script to work. Basically i want my script to look for files within this directory

/apps/gnp/prd/asia/geacssm/ssr/GNPP02/var/ft/backup/

I have put all the files i want to look for in the above directory in a txt file, example of what the files look like:

ledg_ofssgi_02

they normally have a date stamp beside like this ledg_ofssgi_02.3008

This means the file for the 30th August, but because i want to run this script daily , i need to use the date command.

To look for the files i would normally take a file at a time and go into the directory and do ls-ltr *ledg_ofssgi_02.3008* to see if its there

Im trying to use variables, but i just cant get my head round it :((
#!/bin/ksh

set - x

PATH="/apps/gnp/prd/asia/geacssm/ssr/GNPP02/var/ft/backup/"
DST='date +%d%m*'
LIST='ls -ltr'
FEEDS=/export/home/u820052/files.txt

cat $FEEDS | while read listval
do
fed=`echo $listval`
dpath=`cd ${PATH}/${LIST}

I just cant get pass the 1st line cat $FEEDS wont work saying cat is not found.


I can get some of it working doing this instead

cd /apps/gnp/prd/asia/geacssm/ssr/GNPP02/var/ft/backup/

ls -ltr > /export/home/u820052/feed.txt

cat $FEED | nawk ' { print $6,$7,$8,$9 }' |

But then i need to see if my files with todays date is in the directory. i need to add it in somewhere

Im a confuzed and fedup script begineer needing some help and explanation on what im doing wrong.