Listmates, Bash gurus I'm stuck again with a BASH problem that I don't fully understand. I am working with my ATI driver install script and for some reason I must provide the full path name for rpm to be able to install the file, but from everything I see, it should work with a relative path or simply the file name since the script is executed in the same directory as the file. I have underlined the rpm call that is giving me the problem of needing the full path-to-the-rpm. The relative parts of the script are: # ## Assign the Driver Release variable input from the command line before calling ## other functions. Otherwise search for the latest fglrx rpm in the current ## directory, selecting the newest, and test that it is readable. If not found, exit # if [ -n "$1" ]; then FGLRX_RPM="$1" else FGLRX_RPM=$(ls fglrx*.rpm | tail -1) if [[ -n $FGLRX_RPM ]]; then echo -e "\n\t\tSelecting: $FGLRX_RPM\n" fi fi <snip> # ## Ready to Install. Prompt to confirm install or exit # echo -e "\n\tPrepared to Install $FGLRX_RPM\n" read -p "Continue? (yes/no): " INSTALL if [ "$INSTALL" == "yes" ] || [ "$INSTALL" == "Yes" ] || [ "$INSTALL" == "YES" ]; then echo -e "\n\tInstalling $FGLRX_RPM....\n" if [[ ! -r ${FGLRX_RPM} ]]; then echo -e "\n\tUnable to find the fglrx rpm to install.\n\n\tPlease specify the file as a command line option or make sure it is in the present working directory.\n\tExiting\n" exit 1 fi if rpm -Uvh ${FGLRX_RPM}; then ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ echo -e "Install of ${FGLRX_RPM}\T\TSucceeded!\n" else echo -e "rpm -Uvh ${FGLRX_RPM}\T\TFAILED!\nyou will have to install manually -- bummer\n" fi ## Restore the xorg.conf cp /tmp/xorg.conf /etc/X11/xorg.conf else echo -e "\n\tYou chose NOT to install the driver, you will have to install manually\n" echo -e "\n\twith \'rpm -Uvh $FGLRX_RPM\'\n" ## Restore the xorg.conf cp /tmp/xorg.conf /etc/X11/xorg.conf exit 1 fi I don't understand why rpm will error out and say "File not found" unless the full path is given? I can execute the command outside of the script just fine giving only the filename of the rpm, but for some reason when called from inside the script, rpm wants the full path specified. I have tried using different forms of the variable like $FGLRX_RPM and "$FGLRX_RPM", but still the problem. If I pass the full path information, it works just fine. I have also tried passing ./fglrx-rpm-name.rpm since expansion takes ./ as a full path, but that doesn't seem to work either. What is baffling is that even when the rpm is automatically selected from the present directory both the initial echo -e "\n\t\tSelecting: $FGLRX_RPM\n" and the confirmation prompt echo -e "\n\tPrepared to Install $FGLRX_RPM\n" show the proper rpm filename just like you would enter at the command line. However, without the full path, rpm can't find the file. So, admitting defeat, I thought I would post and at least get another pair of eyes on how I'm handling the $FGLRX_RPM variable to see if anybody else could spot why I'm having to pass the full path information to make rpm happy. Thanks! -- David C. Rankin, J.D., P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org