[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with "$@" variable
From: |
w8sdz |
Subject: |
Problem with "$@" variable |
Date: |
Sat, 14 Mar 2009 15:30:38 -0400 (EDT) |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: freebsd5.4
Compiler: cc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='freebsd5.4' -DCONF_MACHTYPE='i386-portbld-freebsd5.4'
-DCONF_VENDOR='portbld' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -I/usr/local/include
-O -pipe
uname output: FreeBSD mail.petersen.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Sun
May 8 10:21:06 UTC 2005
root@harlow.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
Machine Type: i386-portbld-freebsd5.4
Bash Version: 4.0
Patch Level: 10
Release Status: release
Description:
I use the following function in my .profile to make the
hostname and current path appear in my X-Windows rxvt terminal
titlebar:
cd()
{
builtin cd "$0" && xtitle $HOST: $PWD
}
This no longer works correctly since I upgraded bash to the version
listed above. Instead, when I use cd without an argument the following
error message:
-bash: $@: unbound variable
Repeat-By:
Add the above function to your .profile. When you cd
with an argument as in cd /var/tmp it works as expected. When
you wish to return to your home directory do a cd with no argument.
The error appears every time.
Keith Petersen
w8sdz@mail.petersen.net
- Problem with "$@" variable,
w8sdz <=