Sponsored Content
Full Discussion: check the file existance
Top Forums Shell Programming and Scripting check the file existance Post 302260690 by govindts on Friday 21st of November 2008 12:49:35 PM
Old 11-21-2008
check the file existance

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...

Code:
if [ -s $FTP_TO/inventory_i.txt -a $FTP_TO/inventory_b.txt ]; then
echo "exists"
else
echo " does not exists"
fi

The above logic is not working... It is always, displaying Does not exists

Can anyone please correct my logic?

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File existance

Guys Iam trying to do a script to find what files are missing in particular directory.I came up with this for i in file6 file7 file8 file9 file10 file11 file12; do if ; then echo " $file not in /mnt/Server/base/i386/ " else echo " $file ... " fi done Iam trying to print... (2 Replies)
Discussion started by: coolkid
2 Replies

2. UNIX for Dummies Questions & Answers

Checking file existance by extension

I'm sure this can't be too tough, but. I want to check the existance of file(s) by extension. There may be 0,1,N files. If any files exist, then remove them. Thanks for any insight. (3 Replies)
Discussion started by: niswonp
3 Replies

3. Shell Programming and Scripting

Test File Existance Remotely?

Thanks in advance to anyone that can help me answer this: I'm trying to write an if statement that will run test -f on whether a file exists on another server and if it does not then report that negative outcome to a log file. I'm thinking it should look something like this: if ; then rcp... (5 Replies)
Discussion started by: Korn0474
5 Replies

4. UNIX for Dummies Questions & Answers

Test existance of a file

Hi, I need to find out if a particular file exists and i am using if with -e option. Scenarion is like There is a possibility of two files having nomaincluture like below First file = abc20101028.somthing Second File = abc20101028.somthing.done I need to check abc20101028.somthing... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

5. Shell Programming and Scripting

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 :- /home/td_8d02_int_data_IPCL/ILLUSTRATIONS/CGM/l_pc_112138_01_0_01_00.cgm /home/td_8d02_int_data_IPC-L/ILLUSTRATIONS/CMP/l_pc_112138_01_0_01_00.cmp Objective... (1 Reply)
Discussion started by: amitkumar.b2
1 Replies

6. Shell Programming and Scripting

how to check existance of multiple directories

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)
Discussion started by: lookinginfo
1 Replies

7. Shell Programming and Scripting

check for file existance and generate exit code amd move to another directory

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)
Discussion started by: dssyadav
3 Replies

8. Shell Programming and Scripting

Error while checking file existance

Kindly help on below script: << i='find ...' if then echo 'File Exists' else echo 'File Does Not Exist' >> If i has some file name then it runs properly but if i has nothing ( blank value) then it throws an error. I dont exactly remember right now but error seems like:... (2 Replies)
Discussion started by: ravigupta2u
2 Replies

9. Shell Programming and Scripting

Csh/tcsh : Check the file existance and run the script

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)
Discussion started by: kumar_eee
4 Replies

10. Shell Programming and Scripting

Checking Multiple File existance in a UNIX folder(Note: File names are all different)

HI Guys, I have some 8 files with different name and extensions. I need to check if they are present in a specific folder or not and also want that script to show me which all are not present. I can write if condition for each file but from a developer perspective , i feel that is not a good... (3 Replies)
Discussion started by: shankarpanda003
3 Replies
LBT(1)							      General Commands Manual							    LBT(1)

NAME
lbt - LTL to Buchi Translator SYNOPSIS
lbt < formula.txt > automaton.txt lbt2dot < automaton.txt > automaton.dot DESCRIPTION
This manual page documents briefly the lbt and lbt2dot commands. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. Instead, it has documentation in HTML format; see below. lbt is a filter that translates a linear temporal logic (LTL) formula to a corresponding generalized Buchi automaton. The translation is based on the algorithm by Gerth, Peled and Vardi presented at PSTV'95, Simple on-the-fly automatic verification of linear temporal logic. Hardly any optimizations are implemented, and the generated automaton is often bigger than necessary. But on the other hand, it should always be correct. The filter lbt2dot can be used to translate Buchi automata from the lbt output format to GraphViz format for visualization. EXAMPLE
echo G p0 | lbt | lbt2dot | dotty - SEE ALSO
dotty(1). FILES
/usr/share/doc/lbt/html/index.html The real documentation for LBT. AUTHOR
This manual page was written by Marko Makela <msmakela@tcs.hut.fi>, for the Debian GNU/Linux system (but may be used by others). The lbt program was written by Mauno Ronkko and Heikki Tauriainen, and it was optimized by Marko Makela, who also wrote the lbt2dot filter. Please see the copyright file in /usr/share/doc/lbt for details. August 10, 2001 LBT(1)
All times are GMT -4. The time now is 06:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy