Script to store the variable in a table or array.

Hi,

I have few variable say 10

ex:-
l_pc_291334_01_0_01_00.cmp
l_pc_441133_50_0_02_00.cmp
l_pc_441133_55_0_02_00.cmp

Each variable value is coming via loop on a table.

I want to create a script that stores these value to a table or array ( But one by one not all at one time as it is in loop ).

Once in the table or array , we need to write it in last using while or do statement.

Please help i am new in creating script.

what are you trying achieve here, please give us your requirement with out coding terms.

we can interpret your requirement in thousands of way unless you make it precise.

Can you please specify your requirements more clearly.
Give some sample inputs and expected output.

You can use 'set' command. Lets say you get a list of inputs from a directory, store it in an array and then call a function for each of the entries in array.

 
set -A arrayName `ls *.txt`
for anEntry in ${arrayName
[*]}; do
 functionName ${anEntry}
done

Input say i have 10 files.
Like :-
/home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CGM/l_pc_112138_01_0_01_00.cgm
/home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CMP/l_pc_112138_01_0_01_00.cmp
/home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CGM/l_pc_112138_01_0_02_00.cgm
/home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CMP/l_pc_112138_01_0_02_00.cmp
/home/td_8d02_int_data_IPC-L/ILLUSTRATIONS/CGM/l_pc_112138_02_0_01_00.cgm

I want to create a Script for these files. In the script i will check the size of file and it's existance .

Now from here the creation of scripting starts***** ( Need your help in this , please create a full script for me )

#!/bin/ksh

let nb_error = 0.
let nb_error_exist = 0.

Test -s Path + lw_file ( Please tell wether it is ok or not , we have to check the size of file greater than zero )

if [$? ! = "0"]
then
let nb_error = $ nb_error + 1

*************** Now here i want a internal table or array to store the file name only which is empty *************

Store the file name in a table1.

test -e path+lw_file ( Please tell wether it is ok or not , we have to check the existance of the file )

if [$? ! = "0"]
then
let nb_error_exist = $ nb_error_exist+ 1

*************** Now here i want a internal table or array to store the file name only which does not exist *************

Store the file name in a table2.

FI
FI

List of missing released illustrations ( *Constant value )

Loop on table1.
Write the file name.

List of missing released illustrations ( *Constant value )

Loop on table2.
Write the file name.

Output will be Like below :-

List of missing rfiles

l_pc_291334_01_0_01_00.cmp
l_pc_441133_50_0_02_00.cmp
l_pc_441133_55_0_02_00.cmp

List of empty files

l_pc_534941_01_0_01_00.cmp