Problem in making shell script

Dear all

Dear Brother
I am bit new to programming or shell scripting. I have given one shell script which is regarding combining all the 240 or less files in a particular folderwhich is related to one hour of the day. There will be 24 these kind of folders related to a day . It means there will 24 files will be created at the end of day after executation of this shell script which will be put in a specific folder named (/girish). For every folder there will be 240 or less files present in folder named like (/amit/01) for first hour of the day(0 - 1 am),(/amit/02) for the second hour of the day (1-2 am).....so on. Like suppose at 1.05 am there will be 240 files or less present in a folder named ( /amit/01), we have to run a shell script which will combined all these file through cron job and send that file to (/girish) folder. This same procedure happen at 2.05am for folder(/amit/02), 3.05am for folder (/amit/03)........so on till 24 files are created. All these 24 files should follow some naming convenction so that these file can easily be recogonizable which tells which file belong to which hour or folder. Please arrange this script so that I can put in a cron tab file.

Kind regards

Just because you are new does not preclude you from attempting to write a script. What have you attempted so far?

Dear Sir

I have done bit of it , I am facing one problem regarding how will i set a loop in which i will use

cat filename>>tmp

tmp will be the file which will contain the output of all the files in a particular folder.

I already said that in a particular folder there will be 240 or less file present at a given hour and at a given day. If suppose there are 201 file are present in particular folder at a given day about which i don't know, then how will i run the loop 201 times and substitute the filename with a persent file name in that particuler folder

cat filename>>tmp

kind regards

Do you mean something like:

for file in `ls PATH_NAME`
do
cat $file >> tmp
done

this will cat the contents of all the files in PATH_NAME to tmp (unsorted)

thanks a tone

regards