Linux / UNIX Tech Support Forum
This is a discussion on if csh false command syntax within the Shell scripting forums, part of the Development/Scripting category; i try code but it is not working, can you give me syntax? Code: if [ -f myfile ] then ...
Register free or login to your account to remove all advertisements.
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
Thread Tools | Display Modes |
|
|||
|
i try code but it is not working, can you give me syntax?
Code:
if [ -f myfile ] then printf "myfile already found\n" fi |
|
||||
|
Try
Code:
if ( -e /path/to/file ) echo "file found"
__________________
Vivek Gite |
![]() |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Drupal Syntax highlighter Escaping Angel Brackets html < > | jaysunn | Coding in General | 4 | 7th February 2010 02:30 PM |
| [Solved] .bash_profile error syntax error: unexpected end of file | shoboy | Shell scripting | 6 | 3rd February 2010 09:49 AM |
| syntax error | asim.mcp | Shell scripting | 3 | 13th December 2009 07:17 PM |
| SQL Syntax ERROR - C# | eawedat | Databases servers | 7 | 2nd October 2009 07:36 PM |
| syntax for mail | pansarevai | Shell scripting | 2 | 12th February 2008 02:13 AM |