Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-06-2017, 03:07 PM   #16
LQ Veteran
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled

Originally Posted by BW-userx View Post
it is then what takes place by the way you have it written?
I reversed the logic for (! -f). I should have checked my work.
Hope I didn't void my Warranty!

touch LQRocks
if [[ ! -f LQRocks ]] ; then echo "Not found"; else echo Exists  ; fi
rm LQRocks 
if [[ ! -f LQRocks ]] ; then echo "Not found"; else echo Exists  ; fi
Not found
Good eye! Thanks.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Shell Scripting Part I: Getting started with bash scripting LXer Syndicated Linux News 0 04-29-2015 09:03 AM
Bash Scripting Code Structure - Defining Multiple Points Of Entry In Bash Script carlr Programming 10 08-25-2014 03:38 AM
[To share Bash knowledge]Notes for Advanced Bash-Scripting Version 10 (Latest) jcky Programming 4 07-31-2014 10:24 AM
Defensive BASH Programming dugan Programming 10 05-31-2014 02:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration