Bug 1159 - Ash behavior still not correct with $(</tmp/file)
Summary: Ash behavior still not correct with $(</tmp/file)
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-21 09:32 UTC by Lauri Kasanen
Modified: 2010-02-21 13:18 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauri Kasanen 2010-02-21 09:32:20 UTC
Ref bug 1087

The segfault is gone in git master, but the behavior is not correct.

cat /tmp/file
test

echo $(</tmp/file)

^ nothing, it should output the same. In bash it works, in bb until 1.14.4 it works.
Comment 1 Denys Vlasenko 2010-02-21 10:59:14 UTC
I tend to classify $(</tmp/file) special case as a bashism.

I don't see it working in ash in 1.14.4. I also tried 1.10.4, 1.13.4, 1.14.3 and 1.15.0 and they all show this behavior:

# ./busybox ash
# echo $(</tmp/file)

#

Which .config file do you use to make 1.14.4 work?
Comment 2 Lauri Kasanen 2010-02-21 13:18:39 UTC
I'm sorry, my example was not the type I intended. echo $(</tmp/file) does indeed not work in busybox while it works in bash.

The correct use case was [ -e "/tmp/$(</tmp/filename)" ], which works in git master.

Thanks for your time.