[indiana-discuss] bash: printf: `B': invalid format character

Petr Skovron petr.skovron at sun.com
Mon Jun 2 01:57:19 PDT 2008


Hello,

     I noticed that the .bashrc of the user account created during the
installation causes the following misbehaviour:

ps216548 at v64-x2100-prg06.czech:~$ mkdir FOO%BAR
ps216548 at v64-x2100-prg06.czech:~$ cd FOO%BAR/
bash: printf: `B': invalid format character
ps216548 at v64-x2100-prg06.czech:~/FOO_

The problem is that in .bashrc PS1 is set as follows:

PS1='${LOGNAME}@$(hostname):$(
    [[ "$LOGNAME" = "root" ]] && printf "${PWD/${HOME}/~}# " ||
    printf "${PWD/${HOME}/~}\$ ")'

This usage of printf is improper.  Is this a known bug?  (Where does
the .bashrc come from at all?  I didn't find it in /etc/skel.)

     Petr
--

This message posted from opensolaris.org




More information about the indiana-discuss mailing list