The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
43 views

How to set the color of terminal text in ssh session exact same as local session?

So this is almost a copy from my previous question: Change output color of terminal (in Mac) to be different from typed text color for which I got a great answer here: ...
2
votes
2answers
134 views

Why bash history on my mac won't save?

I have always used bash for work, and never had problems with it. Now, it does not save any command in history again. If I open a window terminal, try some commands, it acts like everything has ...
4
votes
2answers
470 views

How to use cd with shell variable containing spaces

I am trying to create an environment variable for a path that is long, has a space, and syntax. I tried the following: export temp=/Users/username/Dropbox (Personal) And added it to my .profile. ...
5
votes
1answer
131 views

Change output color of terminal (in Mac) to be different from typed text color

I know how to change the color of ls output, but I would like to change the color of all terminal output. To make clear what I mean, below is a picture of my terminal. My text color is orange. ...
6
votes
4answers
301 views

Search for *.swo

I think this should be an easy one, but it's got me stumped. When I use the following, it finds the file. $ ls -al .bash_*.sw* -rw-r--r-- 1 damiensawyer staff 12288 27 Nov 07:39 ...
0
votes
1answer
28 views

Is there fuser -k <PID> analogue for Mac OS?

I want to kill process that runs at some port. In ubuntu I used fuser -k 8000/tcp. What is the Mac OS way? I found out this way: lsof -i tcp:8000 kill -9 But it's very long. I need one short ...
0
votes
0answers
46 views

Trying to install gnome-terminal on Yosemite

When I run gnome-terminal I get the error: (gnome-terminal-server:572): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed Here are my versions: Mac OS X - 10.10.5 ...
0
votes
2answers
77 views

What is the content of the $CLASSPATH variable in El Capitan?

I installed OS X El Capitan and, along with it, Oracle's Java 8 SDK. I've already verified that, using java -version, java is correctly installed. I need to add some user classes to the file path, ...
1
vote
1answer
85 views

How to get user GUI input from BASH scripts?

From a BASH script I want to get user input and change system settings, in a loop. I first tried cocoaDialog but that has a fatal flaw: the dialogs are always on top of other windows. Ideally, I ...
4
votes
2answers
262 views

How to access an external drive

I plug in a flash drive to my USB port. How can I access it through bash? ($ cd / takes me to the directory called Macintosh HD, but through Finder, I can go up one more directory called ...
0
votes
0answers
46 views

Why does setting CLICOLOR=1 not turn on colors for “ls”?

If I do ls -G, I do get the colors. From what I understood from the man pages, if I go into ~/.bash_profile and add export CLICOLOR=1 I would then get colors by doing just ls, as "This option is ...
1
vote
1answer
57 views

Bash script not working on Automator but working from terminal

I have this bash script that works perfectly on terminal #!/bin/bash for f in "$@"; do DIRNAME="$(dirname "$f")" filename=$(basename "$f") name="${filename%.*}" extension="${filename##*.}" ...
1
vote
2answers
35 views

How can I run an unsigned script in Automator

I can run the well-respected perl script exiftool from the command line in Terminal and achieve the desired result, but when I incorporate it in Automator as a Service I get a generic error message ...
2
votes
0answers
20 views

Grant rights on a certificate to an app through the shell

I'm currently looking for a way to grant an application rights to a certificate in my /Library/Keychains/System.keychain through the shell. I can currently do this through the Keychain Access App by ...
0
votes
0answers
26 views

Encrypt password on disk for scripting

In the Microsoft Windows platform, there is a service called the Data Protection API (DPAPI), which allows developers to easily encrypt and decrypt values using a simple set of APIs. The encryption ...
1
vote
2answers
78 views

VLC command works in Terminal but not Automator

If I run this in terminal it works fine /Applications/VLC.app/Contents/MacOS/VLC -I rc http://open.live.bbc.co.uk/mediaselector/5/select/mediaset/http-icy-mp3-a/vpid/bbc_radio_fourfm/format/pls.pls ...
3
votes
1answer
1k views

Missing .bash_profile and .bashrc files

I don't have .bash_profile or .bashrc files and I am definitely using the bash shell. I am using Mac OS X 10.11.1 El Capitan. How do I permanently modify my $PATH to cut down the default values Apple ...
1
vote
2answers
40 views

Prevent terminal tabs from auto-renaming

I like to name my tabs when I'm using Terminal so I can keep track of what's inside of them. I do this using the inspector. Unfortunately, whenever I ssh into a machine, my tabs get renamed. Is ...
1
vote
0answers
17 views

Automating VPN switching

I can us a VPN app like tunnelbear to appear to be in other countries, but is there a way to do this in a bash script or applescript? I want to be able to run automated tests on my iOS apps (in the ...
0
votes
1answer
62 views

How to re-install deb package from MobileTerminal (iOS) [jailbroken]

I am trying to run a command to re-install an already installed package. Here is what I see that gives me a clue that I am on the right path, but it doesn't install the package: su ****** apt-get ...
2
votes
1answer
25 views

Launch different apps based on file name (other than the extension)?

I'd like to have different apps handle .jpg files based on a naming convention I'll use for the .jpg files. Specifically most will go to Xee, but ones containing thumb should instead cause VLC to be ...
2
votes
1answer
265 views

Unable to set DYLD_FALLBACK_LIBRARY_PATH in shell on OSX 10.11.1

In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory ...
2
votes
0answers
52 views

Terminal hangs when title includes unreachable NFS path

[Edit: reframing to make the question more clear] I use the Mac Terminal to access remote linux systems. On the Mac, the bash prompt is set by: PROMPT_COMMAND='echo -ne ...
1
vote
0answers
30 views

-bash: 1: command not found - Immediately on loading Terminal [duplicate]

Upon loading my terminal (since trying to install composer globally) I'm being spammed with countless amounts of -bash: 1: command not found before I even type any commands. I'm not quite sure what ...
0
votes
1answer
25 views

What apps use ~/.bash_profile?

I accidentally deleted my ~/.bash_profile, and want to know which apps will go down. What most common apps (development apps) use this file?
3
votes
3answers
58 views

Display interactive notifications (with buttons) via Terminal

I'd like to let my bash shell scripts to display gui notifications with two buttons that the user can click and then execute some commands depending on the button pressed. What options exist?
1
vote
2answers
2k views

Bash script not found El Capitan

I have created a Bash script that simply does ls -l. In Mavericks and older versions of OSX I simply made a symlink to the script and put it in the /usr/bin folder (ln -s ll.sh /usr/bin/ll) and I ...
0
votes
0answers
41 views

Running shell commands from netcat

I have a shell script that I am serving up through netcat - I'm using this as an experiment to learn more about unix I can now do nc 127.0.0.1 1234 | sh and it will pipe the script commands into the ...
1
vote
1answer
48 views

git auto-complete branches with checkout alias

There's this neat script to autocomplete git branches. It works fine with git checkout <tab>. But, I want to take it further. I have a checkout alias: alias co='git co'. How can I make branch ...
0
votes
1answer
58 views

bash script to verify that brew cask is installed

I am writing a script to setup a mac development environment, however I am running into an issue on some peoples macs where cask does not install. Is there a way I can verify if cask has been ...
0
votes
1answer
51 views

Command to find process and restart it

I have an issue with my Logitech Mouse software always crashing when it switches between different power modes, this crashes their software on Mac OS X (Yosemite). The app is used to control the ...
1
vote
1answer
29 views

Permission Denied for apropos command

I'm trying to list the contents of the whole apropos (makewhatis) database with the following command but I keep getting Permission denied. sudo -s apropos . > touch thedatabase -bash: touch: ...
1
vote
1answer
52 views

Run Terminal Command from .terminal file

I just figured out how to export settings from terminal which creates a .terminal file. And I realize that the ExecutionString parameter has changed to the CommandString parameter. I put a command in ...
0
votes
0answers
15 views

Odd issue with iTerm2 (built from Git repo)

I'm currently using iTerm2 version 3, built from the GitHub repo. My default shell is bash, but I have iTerm set up in a way to default to using zsh on startup. I had this set so that the default ...
0
votes
1answer
241 views

Bash Autocomplete Script with El Capitan

About a week ago, I added the following to the end of my .bash_profile script so set up tab completion for man pages: function _man_pages() { local cur opts prev COMPREPLY=() ...
0
votes
2answers
310 views

Install John the Ripper Jumbo

I've been following the instructions here for installing John the Ripper on my Macbook Pro (El Capitan). I've skipped the Iterm and Cuda sections (I have a Redeon GPU). All is well until I run make ...
0
votes
1answer
96 views

Bash command to calculate average on each row and each column

Suppose we have a log file like marks.log and the content looks something like this: Fname Lname Net Algo Jack Miller 15 20 John Compton 12 20 Susan Wilson 13 19 I want ...
2
votes
0answers
17 views

bash: ping: command not found [duplicate]

My shell can't find ping. $ ping -bash: ping: command not found $ uname -r 14.5.0 $ echo $PATH /usr/local/bin:/usr/bin:/bin:/Users/alex/.cabal/bin $ which ping $ However, man ping works and ...
1
vote
0answers
40 views

Adding a directory to $PATH doesn't work in Yosemite

I've tried to do it both ways: 1. I edited ~/.bash_profile like so: $ cat ~/.bash_profile export PATH="${PATH};~/bin" $ $ ls -l ~/.bash_profile -rw-r--r-- 1 myuser staff 202 Oct 1 16:57 ...
0
votes
1answer
96 views

.profile is not loaded on non-login /bin/sh

The problem is in the title, but let me add few details here. I am running on OS X 10.10.5 (14F27). Using default Terminal.app. Content of config files Content of /etc/profile echo " # reading ...
2
votes
1answer
93 views

Why does Apple ship bash 3.2? [closed]

For several years I have been wondering why Apple ships new OS X releases with old version of Bash. I came across the question Update bash to version 4.0 on OSX where there is a mention of problem ...
3
votes
0answers
40 views

Terminal prompt 'saving' certain commands on up-arrow

I added a little bit of shell scripting to my prompt for fun. It alternates the colors of prompt items randomly. I did it purely because a gray screen gets boring after awhile. The following is my ...
0
votes
2answers
54 views

Softlink /bin/bash to a brew-installed bash

It is a question related to this other one, but I can't comment. I've updated to use bash 4 from brew installation. But I don't know if changing all the header scripts from: #!/bin/bash To ...
0
votes
1answer
29 views

In terminal (bash), should I be in a folder to move it to another?

In a directory named World, I've been asked to move a folder within it--South_America--to another folder also within World--North_America. 1. I can't figure out if I should be in South_America or one ...
0
votes
1answer
43 views

Detect mouse move or keystroke

Is it possible to make a program execute when the mouse is moved or any key is pressed?
0
votes
1answer
16 views

Terminal not launching correctly, prompt does not appear until SIGINT

I am running OSX 10.8.5 (Mountain Lion). When I launch terminal, or a new window/tab within terminal, I don't get my prompt. The last login information gets displayed fine, and my cursor is set ...
4
votes
1answer
262 views

Using python screws up the shell (and/or terminal?)!

The problem Simply opening and closing the Python sub-shell screws up my shell (or possibly the terminal?). It seems to remove the shell's ability to print any text I enter, including newlines after ...
1
vote
1answer
113 views

Terminal - don't require password for shell script to run

I am running Yosemite 10.10.5 and I have a shell script which I want to use to toggle whether my wifi connections run through tor or not. This uses the networksetup a couple of times and so asks for ...
1
vote
1answer
341 views

Auto-updating Homebrew

i'm currently using the Homebrew package manager and my question is: is possibile to write a bash's script in order to execute brew update and eventually brew upgrade whenever opening a shell for the ...
0
votes
1answer
17 views

macports: bash_completion not working with make (with gmake or without)

I've installed bash_completion from macports. Completion works fine for git, for instance, where I installed +bash_completion variant. Completion doesn't work for make, whether I install macports' ...