I have a shell script that runs all the time looking for a certain type of file and then it processes the file through a series of other scripts. The script is watching a directory that has files uploaded to it via SFTP. It already checks the size of the file to make sure that it is not still... (3 Replies)
Can someone please shed light on why this may not be working, file does exist, but I get an error
if ]
then
echo "No ${source_path}/${file_mask} found - ">> ${logfile}
result=1
check_result ${result} "Failed to find file... (4 Replies)
Hi
Does anybody know how I can check if a file exists
i.e. see bellow, this doesn't work by the way and if tried countless variations on this
file1=$one/file111.txt
if
then
echo "Present"
else
echo "Not present"
fi
result :
Not present
(file is already present, eventhough its... (3 Replies)
Hi,
I am trying to create a bash script which will check if file exist then remove that file else do nothing. I have to do same process for three files in same script. I have written code for one file and trying to run it.
if
then
rm -r /user1/abc/File1
fi
When I run this code it... (1 Reply)
Hi,
I created following script to check if file exist:
#!/bin/bash
SrcDir=$1
SrcFileName=$2
SrcTimePeriod=$3
if ;then
echo 1
else
echo 0
fi
I ran it like: /apps/Scripts/FileExist.sh /apps/Inbox file1 2nd_period_2010
Even file exist at that location, my above command is... (4 Replies)
I have a list of fields that I want to check a file for, returning that field if it not found at all in the file. Is there a way to do a grep -lc and return the passed variable too rather then just the count?
I am doing some crappy work-around now but I was not sure how to regrep this for :0 so... (3 Replies)
Hi guys,
I am new to shell script, i want to write shell script, the script details has mentioned below
Two files are to be check in one particular directory, if the file exist in particular folder then the file is existed and also if the file exist more than three hours then send... (2 Replies)
friends can do this from unix AIX
I need to ask for a file that does not exist
then if file.txt
*
**** echo "execute procedure"
else
*** echo "File does not exist"
if
You can sucedere that the file does not exist (2 Replies)