Scripting to check the size of file and it's existance.
Hi,
I am totaly new to create a script . Please help.
I have file name retrived from SAP table into a internal table .
Like :-
Objective :-
1) To check the above file size of file and it's existance on unix
2) For this we have to create a Script in SAP directory consisting of detail of above files , with unix code that will run on unix and check it's file size first and then it's existance.
Analysis :-
Loop at SAP_internal_table into variable lw_file
******************Now from here the creation of scripting starts*********************** ( Need your help in this )
*************** 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.
*************** 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
******Writing of script data
List of missing released illustrations ( *Constant value )
Loop on table1.
Write the file name.
List of missing released illustrations ( *Constant value )
I am trying to check whether two files are empty or not using below if condition but its checking for only one file
if ]
Again I tried
if && ]
Need your assistance (2 Replies)
Hi,
I've to wait until a file generated and once its generated, source another script in Linux terminal.
Please help me as this is very very urgent.
The code should be something like
if ( -e "/abc/xyz/a.txt )
source aaa.csh
else
sleep
This should be repeated till the if... (4 Replies)
Hi..
i have a file ABC_*.txt in source directory which will come evry 30 min and same file will be moved to working directory first time ...and will perform some operations then we archive ABC_*.txt ..this will run for 30 min to 45 min
from 2nd time onwards requirement is ...i need to check... (3 Replies)
Hi,
I would like to check whether all the directories exists or not. I tried the below but it gives some error. below is the excerpt from my original script
24 #Check if the required directories are exists
25 dirExists() {
26
27 if
28 then
29 echo "required... (1 Reply)
if ; then
cp /tmp/testfolder/*.* ~/new/logs/
else
echo "No files today"
exit
fi
The problem is this doen't work when there is more than 1 file. Please tell me how to
take the latest file and check the size of the file in a directory (1 Reply)
I want to write a batch job (ksh) with the following requirement
we have file feeds coming to our system from other team,
if the file size is greater than expected then we dont need to process the file for the day
and need to archive the file and send email notification to the manager saying... (5 Replies)
I have following script on AIX/KSH
if ] ; then
echo "filename exists and is > 0 bytes"
else
echo "filename does not exist or is zero length"
fi
It is not working. What is wrong here??? (3 Replies)
Hello, I have two files ..
1. inventory_i.txt
2. inventory_b.txt
I want to check if these two files exists. If exists, then do the process, otherwise, quite...
if ; then
echo "exists"
else
echo " does not exists"
fi
The above logic is not working... It is always, displaying Does... (2 Replies)