1

Background:

I recently learned about the mv -t flag option in bash, but when I checked the man pages on my computer, there was no mention of it. The man pages were dated 9 July 2002. I ssh-ed into another UNIX system and found the mv -t option in the man pages there, dated December 2015.

Problem:

I reckoned my bash shell needed upgrading, so I upgraded from version 3.2.57(1) to 4.3.42(1), following the steps here: http://clubmate.fi/upgrade-to-bash-4-in-mac-os-x/

Now when I run "echo $BASH_VERSION" it says "4.3.42(1)-release", but if I do "bash --version" it returns "version 3.2.57(1)-release". The man pages are still from 2002.

Any ideas what could be going on?

  • OSX is a variant of BSD. You have to be more specific when you say "UNIX". The OSX man pages are also available online: developer.apple.com/library/mac/documentation/Darwin/Reference/… -- the mv command on the Mac does not appear to have a -t option. -t may be a GNU-specific option – glenn jackman Feb 2 '16 at 18:40
  • Note that, with homebrew, the bash you're using may not be the first bash in your $PATH. What does type -a bash tell you? – glenn jackman Feb 2 '16 at 18:41
  • After typing 'type -a bash' I get the following: bash is /bin/bash bash is /usr/local/bin/bash – berkelem Feb 2 '16 at 19:23
  • The other UNIX system is Linux. I use a Mac OSX. Is there any way of forcing Mac to use the GNU shell? – berkelem Feb 2 '16 at 19:27
  • /usr/local/bin/bash will be the homebrew bash. For GNU utils, homebrew is probably your best option – glenn jackman Feb 2 '16 at 19:29
0

Thanks to Glenn Jackman for helpful comments above.

The problem was due to a difference between GNU Command Line tools and OSX Command Line Tools. To solve the problem, I followed the steps at this website: https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/

Now I am running bash version 4.3.42(1) and the man pages are working as I had hoped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.