[EMAIL PROTECTED] NZ PostSep06]$ echo `pwd` /home/corrin/NZ PostSep06 [EMAIL PROTECTED] NZ PostSep06]$ basename `pwd` NZ [EMAIL PROTECTED] NZ PostSep06]$ basename --version basename (GNU coreutils) 5.2.1 Written by FIXME unknown.
Surely the correct output is "NZ PostSep06"? No, it isn't. What gets passed to basename is: basename NZ PostSep06 Two arguments, one being (to basename) a directory, and the other (also to basename) a suffix. You need to quote the argument properly, namley: basename "`pwd`" Then it will work as you want. Disclaimer: This email and any files transmitted with it are confidential and may contain legally privileged material, intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail message in error, please contact the sender and delete the material from any computer. Any use, review, dissemination, distribution or copying of this document by persons other than the intended recipient is strictly prohibited. Thank you Please talk to your mail administrator so this blurb gets removed, if you post to a public list there is nothing confidential about it. The last sentence is also illegal in most countries, there is this thing called `fair use'. Such disclaimers are not only impolite, but they are also not legally binding in anyway. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils