| Summary: | type command output function, Inconsistent with the function definition. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | JianHong Yin <jiyin> |
| Component: | bash | Assignee: | Ondrej Oprala <ooprala> |
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5 | CC: | ovasik |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1010759 | Environment: | |
| Last Closed: | 2014-02-21 14:15:38 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 1010759, 1010761 | ||
| Bug Blocks: | |||
|
Description
JianHong Yin
2013-09-23 02:11:52 UTC
test in RHEL6.5 latest RTT distro
[root@intel-canoepass-01 initscript]# f() { echo $1 | grep --color=auto "kkk"; rm -i kkk; }
[root@intel-canoepass-01 initscript]# type f
f is a function
f ()
{
echo $1 | grep --color=auto "kkk";
rm -i -i kkk <<<--- here
}
[root@intel-canoepass-01 initscript]# rpm -q bash
bash-4.1.2-15.el6_4.x86_64
Petr Stodulka investigated this bug and found out this is actually caused by alias expansion. I'm guessing you have an alias rm='rm -i' set, which bash then expands to 'rm -i -i'; which I do not consider a bug. Please note it's a good coding habit to specify full paths for system utilities in shell scripts, which would also stop bash from silently expanding your alias. |