The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
3answers
40 views

“Command not found” when attempting to cd in Terminal

I am getting errors trying to set up web starter kit via Terminal. I get an error trying to install the kit: $ cd web-starter-kit $ npm install returns -bash: $: command not found. How do I get this ...
0
votes
1answer
34 views

Converting Automator Action in applescript to bash script

I just wrote an Automator app using AppleScript (along with a couple of bash lines) to start FTP with a single click. However it runs more than a tad slow. Here's the code: set ftpstatus to "off" try ...
0
votes
1answer
39 views

Problems With Terminal (/usr/bin)

I'm experimenting around with my computer and I realized that all the commands in the terminal that aren't bash builtins were stored in the /usr/bin. So I wanted to see (to confirm my realization) ...
5
votes
4answers
14k views

OS X Mavericks bash_profile paths don't work

I need to create a new path in OS X Mavericks. To do so, I edited .bash_profile: export LC_ALL="en_US.UTF-8" export PGHOST=localhost export PATH=$PATH:/usr/local/heroku/bin export ...
0
votes
1answer
20 views

I get errors when trying to install GTK+3 on my Mac OSX 10.9 system

I'm trying to install GTK+3 on my Mac OSX 10.9 system to run a pyGObject project I've been developing in Ubuntu. It runs perfectly on Ubuntu, so I wanted to test cross-platform compatibility. I'm ...
0
votes
1answer
26 views

What does update_terminal_cwd do in the terminal of OS X

I am puzzled by it for quite some while now. In $PROMPT_COMMAND of the bash in OS X, there is a command called update_terminal_cwd. I am sure it's not a bash built in, and most likely only exists in ...
0
votes
1answer
23 views

How to download images from an xml feed using terminal?

How can I download png images from an xml feed that looks the following way? <ListBucketResult xmlns="http://url1.com"> <Name>imagesToUse</Name> <Prefix/> <Marker/> ...
42
votes
3answers
17k views

git auto-complete for *branches* at the command line?

On my linux machine I have autocomplete for branches with git. For example I can type git checkout [TAB] and get a list of branches. Or I can type git checkout feb* [TAB] to get all branches that ...
0
votes
1answer
18 views

Fix Terminal error message “-bash: /etc/profile.d/rvm.sh: No such file or directory”

I am trying to remove the following Terminal error message: -bash: /etc/profile.d/rvm.sh: No such file or directory I recently uninstalled RVM (Ruby Version Manager) from my MacBook Air. The ...
0
votes
1answer
455 views

Allow the Terminal.app to pass command key based keystrokes to terminal programs

I want to allow programs running in the terminal the ability to interpret the keyboard short cut Cmd + S I have already Remapped the Terminals' default binding of Cmd + S to Ctrl + S via the ...
1
vote
2answers
48 views

Attempting to run find command gives “Permission denied”

I am attempting to obtain a list of applications on my Mac using find to search for *.app. However, when running the command, I get a lot of Permission denied messages, as below. The computer is mine ...
3
votes
1answer
99 views

How can I define CLASSPATH variable

For a school assignment I need to add a folder to my classpath. It says that I should do this by adding a line to the file .bashrc. However, this file doesn't appear to exist in my computer. I also ...
1
vote
1answer
20 views

Trying to get Sublime Text 3 working from terminal

I am trying to get the Sublime Text to work with Git from the following tutorials http://www.sublimetext.com/docs/3/osx_command_line.html and ...
2
votes
1answer
31 views

Terminal sometimes scrambles initial output

I switched to iTerm 2 a while ago, but would like to fix this small problem that I have with OS X's built-in Terminal. Terminal is supposed to look like this when it first opens on my machine: ...
1
vote
1answer
218 views

-d option for split is illegal on OS X 10.9

I have bash script that works on Ubuntu but for OS X 10.9 i get the error for split command: split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ...
1
vote
1answer
22 views

What's a way to run an automator/bash/applescript command right when a laptop starts charging and right when it stops being charged?

I'm trying to automate running a background application only when my laptop is charging to save battery. So it will launch when I plug the laptop in, and quit when I take it out.
0
votes
1answer
33 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
7
votes
4answers
16k views

How do I execute a bash script that requires root privileges?

I have this script lines from my ISP: sudo bash echo "plugin L2TP.ppp">>/etc/ppp/options echo "l2tpnoipsec">>/etc/ppp/options It works if I paste line by line into Terminal. I want to ...
0
votes
1answer
33 views

Show today’s anniversaries (if any) from contacts

I would like to be able to run a script which would look through my Contacts list and output the name (and, preferably, phone number) of anyone whose ‘Anniversary’ date matches today. (The script ...
0
votes
1answer
33 views

Why is same privileged bash command giving different information from script than from command line?

I wrote a bash script to verify various configs on a system, but I am getting different results depending on whether it is run from the command line directly or from the script. Here is the command: ...
0
votes
2answers
3k views

How do I use arguments together with bash aliases

Today, I learned the very handy trick: man [some command] -t | open -f -a Preview I'd like to create an alias in my .bash_profile file as a shortcut. In order for this to work, I need to pass an ...
0
votes
1answer
54 views

Terminal malfunction when running some executables

Short version I overwrote /bin/sh with something else and now I am having issues with terminal. How/can I restore/reinstall /bin/sh? Long version I think I did something silly. I was searching help ...
3
votes
0answers
15 views

how to run alias using bash -c from IDEA

I'm trying to run a program defined in an alias (and the alias is defined in a source file) alias myapp="/somepath/app -arg1 -arg2" Then I go to IDEA and create an External Tool Program: Bash ...
2
votes
1answer
30 views

Automatically stop a terminal script when locking MacBook Pro

I have written a bash script that I manually start when logging in onto the laptop, but I want it to stop running when I lock my laptop. This doesn't seem a very standard scenario, but I don't want ...
2
votes
2answers
447 views

Mount .sparseimage from .bash_profile

I need to mount a .sparseimage from .bash_profile but I don't get how to do it. I tried: alias of22='hdiutil attach "Documents/OF.sparseimage" -mountpoint "$HOME/OpenFOAM" > /dev/null ; . ...
0
votes
0answers
40 views

Terminal Bash Issue Installing ArgComplete To Use Conda Completion

MBP 13.3 inch Mid-2012 Model, Running Latest Mavericks. Tried many methods such as - Method 1) activate-global-python-argcomplete --dest=/path/to/bash_completion.d Method 2) ...
1
vote
1answer
42 views

Automate mobile terminal?

I have a jailbroken iPhone. I use it to reboot my router when my wifi is going slow or messing up. But I'm lazy and I was looking for a way to automate the process. I use shortcuts that mobile ...
0
votes
1answer
27 views

Automator service to extract file and delete parent

I am trying to create an automator service to take the selected folders in Finder and search each of them for movie files, move those movie files to a certain directory and then move the original ...
8
votes
5answers
4k views

sourcing bash profile for root users

Apologies in advance if this question is going to annoy the hell out of everyone as I appreciate, it's been asked in various ways many times before. Please be assured, I have read the archives and ...
0
votes
0answers
37 views

Installing Ruby 1.9.2 and having trouble

I'm trying to install Ruby 1.9.2 and receiving the following error. "Warning! Requested ruby installation which requires another ruby available - installing ruby-2 first. Checking requirements for ...
2
votes
1answer
20 views

Date trash was last emptied bash

I'm trying to find out at what date and time the trash was last emptied. Would it be the date modified of the least recently modified file? Does moving it to the trash count as modifying it?
3
votes
3answers
117 views

Get full path of script in PATH environment variable

I was wondering if there is a built-in command in Bash (or even something OSX-specific) that would display the fully resolved path of a script that is in the current PATH environment variable. For ...
1
vote
1answer
28 views

Simple deletion of files using text file list won't work

I have to delete files specified by remove.txt which looks like this: img_8138.dng.jpg img_8140.dng.jpg img_8141.dng.jpg img_8143.dng.jpg I've tried several suggestions from the ...
1
vote
2answers
1k views

iTerm2 terminals close immediately with “argpath=login error=No such file or directory”

Whenever I try to open a new terminal window in iTerm, it closes right away after displaying this: ## exec failed ## argpath=login error=No such file or directory Does anyone know what is causing ...
2
votes
0answers
30 views

Auto-complete to multiple possible file extensions

(Edit: I suspect this was a better fit for the Unix and Linux stack exchange network -- could someone migrate this over there? Or do I have to make an account over there myself?) I'm converting ...
2
votes
2answers
64 views

Characters do not echo in OS X terminal unless I hit the delete key

As the title states, when I open up terminal to type a command, I cannot see what I am typing, it is as if the terminal is frozen. I can still execute commands when I hit return, I just cannot see ...
3
votes
0answers
35 views

Get ambient light sensor value from ioreg

I'm using the ioreg command line tool to try and read sensor information available on my computer (iMac). Particularly, I'd like to read the current value of the ambient light sensor. So far, I have ...
5
votes
3answers
3k views

How to reset $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines: ...
9
votes
3answers
16k views

Getting files, all at once, from a web page using curl

I would like to download the files, all at once, from the following page using curl: http://www.ime.usp.br/~coelho/mac0122-2013/ep2/esqueleto/ I tried curl ...
5
votes
2answers
368 views

Command to close terminal window

When I want to close a window I type exit : mbp-thomas in ~ ○ → exit logout [Opération terminée] Then cmd + w to close the window. Is there a way to do it with a little script like if I type ...
3
votes
0answers
36 views

Changing terminal colors for normal files when ls -G or within .bash_profile

So I followed this thread (Changing terminal color) and got all of the colors working for directories and such, except however, for normal files such as a Gemfile or .txt files or .java files or .rb ...
3
votes
1answer
155 views

How can I open a hidden file in Text Wrangler?

I have a .bash_profile file in my Home folder but it is hidden. How can I open it with Text Wrangler (or any other text editor?)
0
votes
1answer
27 views

Why do I need to type ./mysql even that I am in the folder? [duplicate]

So I am in a folder where mysql executable already is.. When I try mysql in terminal I get: -bash: mysql: command not found But this will work: Korays-MacBook-Pro:bin koraytugay$ ./mysql Welcome to ...
14
votes
10answers
9k views

How to get a notification when my commands are done

I'm running a series of commands on the command line that takes approximately twenty minutes to complete. I'd like to see some sort of notification on my Mac when these are finished so I don't need ...
1
vote
1answer
37 views

What is wrong in this Perl regex in OSX?

The code works in Ubuntu, but not in OSX. I run perl -000pe 's/\n/\n\\begin{enumerate}\n/; s/\n\d./\n\\item /g; s/$/\\end{enumerate}\n/' lorem.tex I get -bash: $: command not found ...
2
votes
2answers
43 views

Colors by file type in terminal (running bash)

I'm new to Apple (coming from Linux) and have been stymied in every attempt to use my .bash_profile to get my terminal to color files by their extension (a process which was a single line in my .cshrc ...
2
votes
1answer
53 views

How -exactly- do I remove a specific directory, from my PATH, in OSX, Mavericks?

Ok - so this issue has become somewhat of a white whale for me. I have browsed some of the questions here, but I cannot seem to figure out how to, very simply, delete a directory from my PATH. (I ...
1
vote
2answers
124 views

How to list bluetooth devices from command line

I have to list all available bluetooth devices from command line. I tried to google it, but got only results like "how to turn on bluetooth from terminal". Simply: bluetooth scan Thanks for help in ...
1
vote
2answers
117 views

Shell variable PROMPT_COMMAND not working as intended?

I want my bash prompt to change depending on external conditions. Here is excerpt from the bash manual: PROMPT_COMMAND: If set, the value is executed as a command prior to issuing each primary ...
3
votes
3answers
62 views

How do I clear my Bash history in OS X?

How do I clear my Bash history in Mac OS X? I've entered a few "errors" and just want to clear them off. How do I do that?