The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
32 views

I lost my bash commands (error command not found) [on hold]

I was trying to set up Python environment (virtualenv and virtualenvwrapper, following this tutorial - Install OpenCV 3.0 and Python 3.4+ on OSX) and that's where my problems started. The wrapper was ...
2
votes
1answer
15 views

How to export Moom settings (especially keyboard shortcuts) to external file?

I'm working on some shell scripts to customize OS X to my preferences just by calling one script. From a lot of native OS X options, script is going to easily import some predefined settings form 3rd ...
4
votes
1answer
2k views

How to change bash version with homebrew

I have used homebrew to install the newest version of bash on my local system. I have added a symbolic link from: /usr/local/bin/bash to /usr/local/Cellar/bash/4.2.20/bin/bash and added the line: ...
4
votes
1answer
942 views

Script to change Computername/hostname causing bizarre Terminal behavior

I have a script (mostly borrowed) which utilizes scutil to rename computers based off of values in a CSV file. It matches the serial number to a computer name, sets a variable, and then renames the ...
0
votes
1answer
43 views

Creating a Installpackage for mac

I have a lot of Programms that i always need to install to a new mac. I wanted to simplify this process through an installpackage. I allready tried Iceberg with some success but have a specific error. ...
0
votes
1answer
26 views

Help Understanding Terminal's Command

OS X 10.11.5 on a Mid 2011 iMac. I'm new to development on OS X and am trying to understand enough to figure out a Ruby path issue I'm having. I ran Inspector on Terminal and was surprised by the ...
0
votes
1answer
43 views

How can I edit the .bash_profile?

I want to use matplotlib in Python, but it gives me this error "ValueError: unknown locale: UTF-8". So I searched the internet and people suggest that I should edit my .bash_profile. But when I open ...
0
votes
1answer
23 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
2
votes
3answers
134 views

Set the result of command to variable in Terminal post execution

How can you set the output of a command run in terminal to a variable after it has run? Background (You can skip of you don't need the background) I run VirtualBox VM and do a lot from the command ...
33
votes
11answers
24k 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
2answers
36 views

Why does 'set -x' cause the terminal to dump garbage

This problem is quite annoying and I cannot search Google for 'set -x' because the minus sign has another terminology there. In my MacBookPro, when I use 'set -x' to debug bash commands, I'm getting ...
1
vote
0answers
32 views

Are there any advantages to using GNU over the default OSX command line utilities? [closed]

Are there any advantages to using GNU utilities (installed via homebrew) as opposed to the default, BSD based OSX utilities? They seem very similar to me, but I will not pretend to be a master of ...
1
vote
1answer
22 views

Change iTerm2 profile depending on current directory

Using my .bash_profile, I used to change my iTerm2 profile per machine with the following command: echo -e "\033]50;SetProfile=ssh\a" Now, I want to change it depending on my current working ...
12
votes
4answers
187 views

in terminal, I cannot type lower case e

2015 MBP, fully up to date OSX I open a terminal window and if I type the letter "e" (without quotes of course) it beeps and will not type the letter. Every other letter works just fine in terminal. ...
2
votes
0answers
23 views

Set up a Mac to run OSX (None Browser) application in pure kiosk mode

I've been trying for a number of months, using many methods, to run a Nuiteq Application called Snowflake on our 10 Mac Minis attached to touch-screens in pure Kiosk mode. I'm using Yosemite. These ...
0
votes
1answer
24 views

I get a bash syntax error message every time I open Terminal on macbook

-bash: /Users/admin/.bash_sessions/720116FC-4C25-4FFA-AC15-00D5C843C15F.session: line 1: syntax error near unexpected token (' -bash: ...
3
votes
1answer
139 views

Why does OS X have bash v3.2.57?

OS X comes with bash version 3.2.57 instead of bash version 4.3.39, which GNU lists as the current stable release of bash. Is there any way to upgrade bash on Mac OS X?
2
votes
2answers
390 views

How to show vi mode in bash?

I'm on Yosemite, using vi mode in bash (set -o vi in .bash_profile) and I want to have the prompt indicate if I'm in edit or command mode. I looked around and found that this feature has been ...
0
votes
1answer
62 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
-1
votes
0answers
24 views

System Integrity Protection removes (DY)LD_* environment variables: How do I get around this?

System Integrity Protection strips some environment variables, such as LD_LIBRARY_PATH when calling protected binaries. If you use a (ba)sh script or the env binary to pass a script on to some ...
0
votes
1answer
28 views

Is it possible to create a service using only the shell and bypassing automator altogether?

Using automator is somewhat of a tedious task. Using the shell in the Terminal is much easier all around. Even using the "Run Shell Script" action inside automator is not the same as using the actual ...
0
votes
1answer
173 views

Run script when new user logon the first time

I want to run a couple of .sh scripts when the user first login after user creation to set the correct settings. I know there is a folder (/Library/StartupItems) that let you place script for running ...
3
votes
2answers
2k views

Source a script from a URL in bash

I gather this should work in bash: source <(curl -s https://example.com/script.sh) or bash <(curl -s https://example.com/script.sh) or curl -s https://example.com/script.sh | source ...
3
votes
2answers
47 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
1
vote
2answers
59 views

Using launchd to monitor a running program or process

I've written a simple bash script to check whether a program (supplied as its only argument) is running and send an email to a set address in the script if it's not. The script works if run on the ...
0
votes
0answers
15 views

$PATH change won't persist [duplicate]

I looked at my $PATH and noticed that it starts with: /Applications/anaconda/bin: This doesn't seem right to me and I am not sure how it got there, so I tried to reset $PATH in terminal using: ...
0
votes
0answers
39 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header ...
0
votes
0answers
32 views

Attach file to Outlook 2016 email using AppleScript

I am attempting to attach a tar.gz archive of system logs to an Outlook 2016 email that gets created from another shell script. The script was modified from this one at JAMF Nation. Because the file ...
-1
votes
0answers
13 views

Adding text to a png with OS X bash but without third-party installed? [duplicate]

$ convert -bash: convert: command not found $ gm -bash: gm: command not found Is it possible to make an OS X El Capitan bash script to add text to an image (a png), without installing ...
1
vote
1answer
31 views

The terminal on my Mac does not work anymore after installing Python & Sublime Text

I was trying to install Python3, and Sublime Text 3 in order to learn and run Python. Unfortunately, I watched some videos on youtube and tried to follow their instructions, I did something with my ...
1
vote
1answer
68 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
4
votes
3answers
2k views

Compare multi-digit version numbers in bash

Trying to write a script that searches for the version of the Application then returns the value. My problem is the value is three to four intergers long (example 4.3.2). I have searched for a while ...
1
vote
4answers
72 views

In Terminal, how can you determine which shell is actually running?

Using Terminal on OS X 10.11.4, initializing Terminal opens a new window running bash (by default). As I understand it, inputting echo $SHELL should output the shell that said command is submitted to. ...
1
vote
2answers
1k views

Install Monokai Theme on Terminal with prompt colors, etc.?

I already have a Monokai theme installed in Terminal, as so: I was wondering how I could get the rest of the Monokai (as Sublime uses) into Terminal? Like, making the prompt (Gamma@~) colored, etc. ...
4
votes
1answer
55 views

Using 'alias' in bash script in OSX

I write some scripting and I want to make it work on Linux and Mac. The problem is, that "Implementations of sed, readlink, zcat, etc. are different on OS X and Linux." So I tried THIS approach, but ...
0
votes
1answer
18 views

How do I remove a ColorSync profile from a JPEG image from Terminal in El Capitan?

I have several images that I would like to strip the ColorSync profile from. Eventually, I would like to automate this in bash so I could easily process this on a file or folder from the contextual ...
4
votes
4answers
7k views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
0
votes
1answer
35 views

Mac OSX equal to linux time command

What's binary that will give exact result for Linux's time command flags? alias tcmd='/usr/bin/time \-f\ "CPU: %Us\tReal: %es\tRAM: %MKB"' Current time in Mac OSX for command above is: ...
0
votes
1answer
25 views

What's ls option in OS X does what ls -w 1 in Linux does, showing output in one column?

In Linux ls -w 1 shows list of files in 1 column instead of multi-column. What flag or other command will produce the same result in OS X? Current output under OS X: ls: 1: No such file or directory ...
1
vote
3answers
96 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: ...
0
votes
3answers
77 views

How do I run a .sh or .command file in Terminal

I've always wanted to be able to run a script I've downloaded online directly from the Finder but just double clicking the file does not work.
43
votes
2answers
71k views

Why doesn't Mac OS X source ~/.bashrc? [duplicate]

I found a lot of people figuring out why instruction similar to this : Put X to your ~/.bashrc and you can do Y don't work. It always turns out that Mac OS X's bash's startup files (or Mac's ...
6
votes
4answers
8k views

How to make bash (Terminal.app) remember history of previous sessions?

In my computer at work, my bash shell remembers history from previous sessions, even if I just opened a new terminal. In my computer at home, this doesn't happen. I have the same OS 10.6.8 in both ...
0
votes
0answers
18 views

How can I auto resume background jobs upon login

I'm running a bash script over several days. When I put the laptop on sleep and log back in, the script is stopped. I have to send the kill -CONT message to the process for it to resume. Is there a ...
0
votes
1answer
17 views

What environment variables are set in .profile for OS X?

I accidentally overwrote my .profile file and I believe deleted my environment variables. To be honest, I don't really understand how the operating system handles environment variables. My rough ...
1
vote
2answers
41 views

Why doesn't pbpaste return cursor at new line in bash?

I run the command pbpaste in Terminal (bash) to get the result of my clipboard, but unlike other commands which leave the cursor at a new line below the previous stdout, pbpaste leaves it to the right ...
0
votes
1answer
39 views

Is there a `watch` command native to Darwin/OS X?

I have a script that I'm trying to port from Linux to Darwin/OS X. The Linux version currently depends on the watch command, which doesn't appear to be installed on Darwin/OS X by default. What's the ...
2
votes
1answer
54 views

/usr/local/bin/ not found by Automator and Java but exists in Terminal [duplicate]

Automator Shell Script echo $PATH eval /usr/libexec/path_helper -s echo $PATH Results: after the first echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin after the second echo $PATH: ...
1
vote
1answer
155 views

Shell command or series of commands similar to the Automator action “Get Link URLs from Webpages”

I have a long list of URLs. Contained within each of these webpages, there are links I need to extract. The Automator action Get Link URLs from Webpages is a very useful action for this task. ...
0
votes
0answers
91 views

El Capitan Mac: /usr/bin/login tries to run /bin/false

Just upgraded from Yosemite to El Capitan, and I started out with an Emacs problem: it wouldn't launch from the Emacs.app icon, complaining that it couldn't find /bin/false. I tracked this down to ...