10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have the below code written. However I am not getting the desired output
I am checking if the particular path has file in it.
#!/bin/bash
ls -l /IRS2/IRS2_ODI/INFILE/*LS* 1>/dev/null 2>/dev/null
if
then
echo $?
echo "File Exists"
fi
... (3 Replies)
Discussion started by: Shanmugapriya D
3 Replies
2. Shell Programming and Scripting
Hi All,
I am a beginner in this and trying to write a shell script in linux which will :
1. Ask for a file name and check if its exists.
2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists.
3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies
3. 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
4. Shell Programming and Scripting
Hi. I'd like to have an IF-Then-Else statement where I can check to see if a file exists? We have the Bourne Shell by default. I'm looking for the syntax to do something like this:
if myfile.txt exists then
...my code
else
...my code
end if
Any help would be greatly... (5 Replies)
Discussion started by: buechler66
5 Replies
5. Shell Programming and Scripting
Hi,
When trying to chk if a folder exists on remote server using the below command (got it from other thread in this forum)
"ifvchr@s1.mrix.local '/cygdrive/d/shares/projects\ data\ load/test\ files/$SCPED_FILES$name$code'`];
then
echo "Directory exists";
else
echo "Directory... (0 Replies)
Discussion started by: funonnet
0 Replies
6. 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
7. 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
8. Shell Programming and Scripting
hi,
I posted a thread before on that subject, but with a wrong focus...
here's my problem: I want to check if a file exists in a windows shared folder mounted using:
sudo mount -t cifs -o username=xxx,password=xxx,uid=xxx,gid=xxx //192.168.0.92/public /media/92_shared
I tried
if
... (2 Replies)
Discussion started by: jul
2 Replies
9. Shell Programming and Scripting
Hi,
I want to sftp some files to a remote directory. Before transferring files i want to check whether the required folder exists. If so copy the files to that folder, else create the folder and copy the files.
Thanks in adv (1 Reply)
Discussion started by: borncrazy
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
How do we check whether a folder exists already using unix script? My requirement is to check whether a folder already exists, if not create a folder else return a warning. Can anyone help me with this requirement
Thanks (5 Replies)
Discussion started by: borncrazy
5 Replies