URL:
<http://savannah.gnu.org/bugs/?27495>
Summary: echo behaves different in pipe for /bin/sh
symlinked to dash
Project: make
Submitted by: None
Submitted on: Di 22 Sep 2009 08:24:14 UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: 3.81
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Hi,
'\nfoo' is interpreted differently by echo:
| f...@bar % cat Makefile
| default:
| echo '\nfoo'
| echo '\nfoo' > bar
| f...@bar % make
| echo '\nfoo'
| \nfoo
| echo '\nfoo' > bar
| f...@bar % cat bar
|
| foo
| f...@bar % ls -l /bin/sh
| lrwxrwxrwx 1 root root 4 11. Aug 11:51 /bin/sh -> dash
If SHELL is set to '/bin/dash' this changes:
| f...@bar % cat Makefile
| SHELL=/bin/dash
| default:
| echo '\nfoo'
| echo '\nfoo' > bar
| f...@bar % make
| echo '\nfoo'
|
| foo
| echo '\nfoo' > bar
| f...@bar % cat bar
|
| foo
When SHELL is set to '/bin/sh' the strange behavior arises again:
| f...@bar % cat Makefile
| SHELL=/bin/sh
| default:
| echo '\nfoo'
| echo '\nfoo' > bar
| f...@bar % make
| echo '\nfoo'
| \nfoo
| echo '\nfoo' > bar
| f...@bar % cat bar
|
| foo
HTH
| f...@bar % make --version
| GNU Make 3.81
| Copyright (C) 2006 Free Software Foundation, Inc.
| This is free software; see the source for copying conditions.
| There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
| PARTICULAR PURPOSE.
|
| This program built for i486-pc-linux-gnu
| f...@bar % cat /etc/debian_version
| squeeze/sid
| f...@bar % apt-cache policy make
| make:
| Installed: 3.81-6
| Candidate: 3.81-6
| Version table:
| *** 3.81-6 0
| 500 http://ftp.de.debian.org testing/main Packages
| 100 /var/lib/dpkg/status
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27495>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make