Home » Infrastructure » Unix » Shell script issue while finding files (Linix)
Shell script issue while finding files [message #432873] |
Thu, 26 November 2009 23:21  |
bryanadams
Messages: 9 Registered: September 2009 Location: Bangalore
|
Junior Member |
|
|
Hi all,
My scripts looks like this .. when i execute this script its says file does not exist even though file is present physically and if the file does not present in the file system then the output is null.
I am wrong somewhere .. ??
echo " enter file "
read name
for i in `find /apps12i -type f -name $name -printf %f `
do
if [ -e $i ]
then
echo "file exists"
else
echo "not exists "
fi
done
Regards
Bryan.
|
|
|
|
|
 |
Goto Forum:
Current Time: Thu Apr 17 02:12:25 CDT 2025
|