Title: | Volume 4, Take a RISC with ULTRIX |
Notice: | Read 1.*!!!! No OSF/1 questions allowed! |
Moderator: | SSDEVO::ROLLOW |
Created: | Wed Jun 05 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 5478 |
Total number of notes: | 14927 |
A customer have reported that 'ls' a non-existent file does not return a non-zero code when he tried to use it inside his program. He is using Ultrix 4.5 He has also done with it in Digital Unix on Alpha platform but it does return a non-zero code 'correctly'. Is it a bug or design issue? - feynman [Posted by WWW Notes gateway]
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
5468.1 | NABETH::alan | Dr. File System's Home for Wayward Inodes. | Tue Apr 15 1997 15:34 | 11 | |
Probably more a case of wrong application for problem. ls(1) often operates are more than one file at a time. If you want to test for the existance of a file, use test(1). If you need the ls(1) information about that file, use ls(1) after you know it exists. What would ls(1) return when you use a wildcard and some of files exist and some don't? A failure will be wrong, because it succeeded. A success is wrong because some failed. There's no right answer, so ls(1) probably has the take the path that causes the least trouble. |