The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Shell Programming and Scripting
what does this mean IF [ ! -f name ]?
Tags
beginners
,
shell scripts
Login to Discuss or Reply to this Discussion in Our Community
Thread Tools
Search this Thread
Top Forums
Shell Programming and Scripting
what does this mean IF [ ! -f name ]?
#
1
09-10-2010
dvah
Registered User
71,
2
Join Date: Jun 2010
Last Activity: 28 September 2011, 5:52 AM EDT
Posts: 71
Thanks Given: 17
Thanked 2 Times in 2 Posts
what does this mean IF [ ! -f name ]?
Im a newbie to shell scripting,
Please can suggest me some tutorials/materials to start scripting on my own.
Thanks!
dvah
View Public Profile for dvah
Find all posts by dvah
#
2
09-10-2010
zaxxon
Registered User
6,575,
572
Join Date: Sep 2007
Last Activity: 5 November 2019, 9:08 AM EST
Location: St. Gallen, Switzerland
Posts: 6,575
Thanks Given: 179
Thanked 572 Times in 484 Posts
Unix/Linux is case sensitive - something to obeye all the time ^^
It tests if the file "name" does not (! is a negation) exist and is not a regular file and turns "true" in that case. You can check for more testing options if you type in
Code
:
man test
zaxxon
View Public Profile for zaxxon
Find all posts by zaxxon
#
3
09-11-2010
rdcwayx
Registered User
2,759,
420
Join Date: Jun 2006
Last Activity: 13 September 2015, 8:58 PM EDT
Posts: 2,759
Thanks Given: 44
Thanked 420 Times in 408 Posts
You can start from here:
Bash Guide for Beginners
Your question's answer is here:
Introduction to if
rdcwayx
View Public Profile for rdcwayx
Find all posts by rdcwayx
Login or Register to Ask a Question
Previous Thread
|
Next Thread
Login or Register to Ask a Question
Member Badges and Information Modal
×