| Summary: | error in testing file of existence | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | mbr |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | RESOLVED INVALID | ||
| Severity: | critical | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.18.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
Not a bug: bash and coreutils do the same.
You should use
if [[ -e "${FILE}" ]]
instead.
|
The following script fails: #!/bin/ash FILE= if [[ -e ${FILE} ]] then echo "found file: \`${FILE}'" else echo "did not found file: \`${FILE}'" fi The test is always true!! So it says: found file `'