![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| question about testing in shell programming | thungmail | Shell Programming and Scripting | 6 | 04-09-2008 03:04 PM |
| question about testing in shell programming(modifications were made) | thungmail | Shell Programming and Scripting | 2 | 04-08-2008 04:51 PM |
| question about testing in shell programming | thungmail | Shell Programming and Scripting | 2 | 04-08-2008 03:29 AM |
| question about testing in shell programming | thungmail | Shell Programming and Scripting | 3 | 04-05-2008 11:29 AM |
| question about about Shell programming | thungmail | Shell Programming and Scripting | 1 | 04-01-2008 02:40 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I created a file named q2.c in /home/tuan/Desktop/Shell_programming. I coded a script named "test" to check whether the file existed or not. My code : Code:
#!/bin/sh submitDir=/home/tuan/Desktop/Shell_programming/submit if [ -e $submitDir/q2.c ] then echo "There is no q2.c" else echo "There is q2.c" fi After that i executed the code and I got the message from the termial Code:
tuan@tuan:~/Desktop/Shell_programming$ ./test There is no q2.c tuan@tuan:~/Desktop/Shell_programming$ I did not get it . Can anyone explain to me and what should i make a change for my script Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|