Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

quick question regarding the "script" command in Bash on a Mac OSX 10.8.4 system.

In any other bash environment on Fedora, CentOS, etc; when I use the script command it just begins recording with no issue.

However, on the Mac OS as soon as I type script it goes and starts displaying my entire file system as if I used the "tree /" command. Identical to it, actually. Once it finally stops it beings recording like usual.

It there a reason for this strange behavior? I do have a tree command installed for this OS (as it didn't come pre-installed) perhaps this is causing some issues?

Thanks in advance for your help!

share|improve this question

migrated from Sep 12 '13 at 19:11

This question came from our site for professional and enthusiast programmers.

Run type script and see what you get? – anubhava Sep 12 '13 at 18:39
@anubhava I get the output script is /usr/bin/script – user2773870 Sep 12 '13 at 19:08
By any chance the tree command is running from your bashrc or other scripts started from bashrc? script starts a subshell. – jaychris Sep 12 '13 at 21:04
Does it do this if you run it as a different user? I'm thinking you may have something strange in your .bashrc or .profile or something. – terdon Sep 12 '13 at 22:27
You guys were right! I had a strange command entered into my .bashrc that, when run; does the aforementioned issue. I can't remember why I had it in there or for what purpose. Removing it fixed the problem! Oh; the entry was find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' – user2773870 Sep 12 '13 at 22:57

You must log in to answer this question.

Browse other questions tagged .