10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need to check whether a file exists and has been changed.
The file should contain a specific string. The file should also have been changed within the last ten seconds.
How do I do that? (3 Replies)
Discussion started by: locoroco
3 Replies
2. Shell Programming and Scripting
Hi all,
One of my script crated created 2 files in a dirs Output.log and Output.tmp. Now in another script i need to check if both of the above mentioned files are present in a directory or not.
I know to check one file but need to check both the files.
Anyone could please tell me how... (3 Replies)
Discussion started by: girijajoshi
3 Replies
3. Shell Programming and Scripting
In a Shell Script what is the most generic way to find in the PID exists or not.
If it does not exist how can I echo the user "PID does not exist" & terminate the unix script ?
If the command can work on most flavors of operating system the more useful I will find it to be.
Current system... (16 Replies)
Discussion started by: mohtashims
16 Replies
4. Shell Programming and Scripting
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies
5. UNIX for Dummies Questions & Answers
Hi friends,
I am trying to check if the two files i am expecting are created in a specific location.
if both files does not exist, do an echo
if -a ]; then
echo "files not found"
fi
It gives me the following message:
bash: Please help! :) (3 Replies)
Discussion started by: kokoro
3 Replies
6. Shell Programming and Scripting
I want to write a script to see if various files exist. What I want to do is have the script search in various directories if a file exist, and if not, then output something like "/path/file does not exist". I don't actually know of how to check and see if a file exists or not. What I have in mind... (2 Replies)
Discussion started by: astropi
2 Replies
7. Shell Programming and Scripting
Hi everyone. I am trying to write a bash script that will copy files from one directory to another but I need to be able to check the directory that I'm copying the files to and see if the file already exists. If it does I need to add a number at the end of the copied file. Thanks for your help. (3 Replies)
Discussion started by: snag49ers
3 Replies
8. Shell Programming and Scripting
Hi friends..
I hav a problem....
I dont know how to check .c files exists r not in a folder using IF in C shell script
actually i tried like this
if(=~ *.c)
even though some .c files or there in the current folder..it is not entering int o the if control statement...... (17 Replies)
Discussion started by: p.hemadrireddy
17 Replies
9. Shell Programming and Scripting
Hi folks!
First off I'm working with a Sybase DB.
I'm using you're basic ISQL command to connect to my Sybase DB...
isql -S$DB_SERVER -D$DB_NAME -U$DB_USR -P$DB_PWD <<!EOF > $log_file
My question is, is there a way to determine if a database exists using shell script?
For example, if... (2 Replies)
Discussion started by: Fatbob
2 Replies
10. Shell Programming and Scripting
Hi Good people :D
How do I check if a directory exists, if it does then carry on rest of the script, otherwise exit.
-------------
cd $mainfolder/system1
#unzips files arrived in last 24 hrs into temp directory
find * -mmin -1440 -exec unzip {} \;
I'd like to check here if temp... (2 Replies)
Discussion started by: SunnyK
2 Replies