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