The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
0answers
41 views

Why is my simple Automator script broken in latest Yosemite update (used to work)?

I had a basic Automator script I was using with a keyboard shortcut to bring up the login screen as a sort of lockscreen. It was working mostly fine until 10.10.1 (I had to manually launch from ...
4
votes
1answer
58 views

Launchd starts event 40 seconds later?

I've created a .plist file, which should act as system daemon (global with root user). This .plist file listens to the settings directory for changes like changing network settings. When this happens ...
0
votes
1answer
17 views

Is there a way to immediately exit a hanging connection in Terminal?

I often have SSH connections through Terminal that stop responding (like if I've left it overnight) but when I try to use the dead connection Terminal doesn't respond for several minutes until: Write ...
0
votes
2answers
351 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
2answers
39 views

Percent character breaks Terminal

If I type the % character in the Terminal, it breaks that shell and every new shell I open until reboot: $ seq 10 | parallel -j50% "echo Hi {}" -bash: printf: `"': invalid format character Does ...
0
votes
1answer
28 views

Escaping variable in script

I'm using script.sh in an OS X Mavericks terminal containing only the following: echo ${1} ls ${1} Now, when I call ./script.sh "/Users/me/some\ directoy\ with\ whitespace/", the echo command ...
3
votes
1answer
299 views

how to get ls to list files in case-insensitive order?

How do I get the ls shell command to list my files in: case-insensitive order with the directories at the top? The reason I ask is: I want Aquamacs Emacs dired to list my files and directories ...
0
votes
1answer
64 views

OS X Terminal – Open Tab in current directory, troubles with umlauts

I run OS X 10.7.5. I am currently experiencing an issue with Terminal. I have enabled the option to open new tabs in the current working directory. However, this does not work as expected, when the ...
0
votes
0answers
17 views

Damaged preference file in /bin/sh

Today in Drive Genius 3, I ran the “Verify Preferences” function in Repair. It yielded this strange result: /bin/sh: xargs: command not found The only option Drive Genius gives is to remove the ...
0
votes
1answer
18 views

In bash, can test -e look for a file with a semi-variable name using *?

I have an if then looking for a certain set of files. They all start with lib, so I could either set an if then up for each one or I was hoping there's a way I can use an asterisk. Here's what I have ...
1
vote
3answers
71 views

Running a .sh file but after new PATH is not visible in shell

I am running a file ./setWLSEnv.sh which has the following output: http://pastebin.com/sSXRZd1s ...
0
votes
1answer
48 views

Terminal: command overridden via shell script in /usr/local/bin not executed unless called directly

I've created a shell script wrapping ssh to change my terminal background when connecting to a server following one of the many examples on this site and stackexchange. 11:22 ~ $ echo $PATH ...
0
votes
0answers
16 views

How do I accomplish the same task of a Bash script with an Apple script?

The following BASH script was written for a self-contained bundle, I would like to write an Apple script to accomplish the same thing, also in a self-contained bundle. How can I convert this BASH ...
0
votes
2answers
26 views

find supress permission errors

Running find command on root folder : find / -type d -wholename "prog" -print Keep seeing errors like find: ./Users/auser/Library/Preferences: Permission denied How can I supress these? If no ...
0
votes
1answer
37 views

Setting environment variables for scripts run by launchd?

I have a script that worked in the past, but seems to be having issues now (I believe it's due to Yosemite). What I had done was created an environment variable that was set to "false" and then my ...
1
vote
0answers
21 views

Running “irb” changes my zsh to bash on iTerm2

I'm running OSX 10.9.4, and my default shell is set to z shell. I was just working out my installation of Ruby and RVM and playing around with irb when I suddenly notice that my window title says ...
11
votes
2answers
14k views

Using terminal to get current fan speed?

I would like to view the current fan speeds of my MacBook and iMac using terminal. I've found that running spindump then cat /tmp/spindump.txt | grep "Fan speed" will show it, but that's very slow and ...
1
vote
1answer
32 views

Missing .Bash Files in ~/

While uninstalling/removing home-brew, node, and yeoman...I noted that I don't have a .bashrc or .bach_profile in my home directory. I only have .bash_history present. Why is this? Is this bad? If ...
0
votes
1answer
20 views

Power consumption of a bash command

I want to run a bash script on my jailbroken iPhone whenever it is being charged. Currently my script looks like this: #!/bin/bash ACpower=$(pmset -g | sed -n '2 p' | grep -o '*') if [ "$ACpower" ...
5
votes
4answers
5k 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: ...
0
votes
1answer
34 views

core dumps in Mac OS X

I was wondering if core dumps are disabled by default in Mac OS X, or if we have to add the following line to our .bash_profile: ulimit -S -c 0
2
votes
2answers
250 views

Bash Terminal keeps showing “No such file or directory” at startup

-bash: /Users/MarksMac/Library/Enthought/Canopy_64bit/User/bin/activate: No such file or directory Basically, how do i remove the above error? I am using a mac 10.9.1 I have tried looking up ...
0
votes
2answers
58 views

Launchd unloading LaunchDaemon

I have a script scheduled to run as LaunchDaemon. Script runs fine when launched manually through terminal. I have two commands sudo launchctl unload -F /Library/LaunchDaemons/com.test.plist sudo ...
1
vote
1answer
22 views

How do I replace a symlink with the actual file?

I want to remove the symlink and instead insert the file it links to, if possible all with one command so I can have it as an "External Tool" in phpStorm.
3
votes
1answer
121 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 ...
0
votes
1answer
26 views

Running a script with assets inside automator application

So, I'm trying to write an automator application that runs a simple script. python Contents/main.py where Contents is the contents of the .app. When the script is run it is run in ~ not in the ...
0
votes
1answer
28 views

running a command stored in a bash variable

So I'm trying to capture the IP address of a Parallels VM guest (Win8) from the host (OS X). I thought a bash script would be good for this. The ultimate goal is to have a single command that will ...
0
votes
0answers
75 views

PROMPT_COMMAND='history -a; history -n' changed (broken) in Yosemite / bash 3.2.53

I need my command history to be shared across all terminal sessions and all commands available for immediate recall from any other terminal. This is the default for old school ksh shells but hasn't ...
2
votes
2answers
1k views

How to enable Maven autocomplete on Mac OS X command-line?

When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this: mvn pa [TAB] -> mvn package mvn je [TAB][TAB] -> mvn jetty:run
0
votes
0answers
36 views

Problem with PATH after installing MySQL

I'm looking for help concerning a problem with my Terminal. After some researches on differents websites, forums, I'm not the first one in that case, but all the solutions I've tried sofar did not ...
0
votes
1answer
34 views

Getting unknown command error when trying to run a bash script

I recently had to re-install 10.9.5 (default install) and am now finding that bash scripts that run perfectly from the command line (~/Me...) no longer work using crontab. I use crontab to invoke ...
5
votes
2answers
361 views

Terminal not displaying colors for directory listings

I don't know why my bash session doesn't show colors. I have tried Terminal as well as iTerm. I have tried: ls -G Setting export CLICOLOR=1 and export LSCOLORS=GxFxCxDxBxegedabagaced Using ...
2
votes
2answers
63 views

Auto-Update Script

I'm trying to get the Macs at my workplace all updating at a specific time. To do so, I'm running a bash script from a spare Macbook running OS X Server. I have one minor and one big issue with my ...
6
votes
5answers
18k 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 ...
2
votes
1answer
72 views

changes to .bash_profile causing Terminal shell to not load but keep looping with PATH settings

I was trying to make some changes with PATH (mostly add a new PATH) to my .bash_profile and the last line entered was source .bash_profile. After I saved and restarted the Terminal app, instead of ...
0
votes
1answer
93 views

Commands not found in Terminal except echo

In my terminal basic commands are not found like: mds-macbook-pro:~ ZILLURRAHMAN$ ls -bash: ls: command not found mds-macbook-pro:~ ZILLURRAHMAN$ env -bash: env: command not found mds-macbook-pro:~ ...
335
votes
7answers
242k views

How do I recompile Bash to avoid Shellshock (the remote exploit CVE-2014-6271 and CVE-2014-7169)?

Given that Bash 3.2 (the version shipped by OSX) is vulnerable to the remote execution exploit known as "Shell Shock" (CVE-2014-6271 and CVE-2014-7169) how do I rebuild Bash and secure my system ahead ...
46
votes
5answers
27k views

Are Macs vulnerable to the Bash shellshock bug?

Red Hat recently announced a major security-related bug in the Bash shell. Some are calling it the "shellshock" bug. Since OS X is built off of Unix, is it vulnerable to attacks that exploit this bug? ...
3
votes
2answers
329 views

Have Apple announced whether the “Shellshock” bash update will be applied automatically via the App Store patching mechanism?

As described here, I'm technically vulnerable to the "Shellshock" bug in my shell. I'm running Mavericks. Apple has released an update to bash that addresses this issue. As per the example test ...
8
votes
2answers
4k views

Is there a Mac OSX equivalent of zenity?

I'm porting some simple X windows/bash scripts to Mac OSX, but I cannot find a build of Zenity (a Gnome app for basic GUI dialogs) for OSX. Is there some other command line driven dialog utility I can ...
0
votes
0answers
83 views

Bash shell doesn't inherit $PATH set in /etc/launchd.conf

I am new mac OS X user and recently I am setting up my laptop as a work environment. That concerns environment variables setting in shell. After some search work I found several ways to set ...
8
votes
1answer
113 views

What is the __CHECKFIX1436934 environment variable?

On OS X 10.9.5 my bash shell has the following environment variable set: __CHECKFIX1436934=1 What is the purpose of this value? I am surprised there is no record of anybody asking this before.
0
votes
2answers
39 views

Route command to use wildcard

I have a bunch of routes to my LAN line that won't resolve through my WiFi (which is set as 1st order). sudo route add 10.999.999.999 10.888.888.888 I have a lot more but that's just a sample. This ...
3
votes
3answers
1k views

Any way to update OSX 10.4's Bash version?

I'm running Bash version 2.05b.0(1)-release (powerpc-apple-darwin8.0) on a PowerMac (non-Intel) G5. I often connect to the internet, but not as a server and I believe my version of Bash is vulnerable ...
1
vote
1answer
32 views

Run script before every Time Machine backup?

I would like to be able to run a bash script just before Time Machine runs, every time This script generates some content to be written on a file which needs to be backed up by TM. I have looked ...
1
vote
1answer
29 views

Terminal not recognising commands

I have tried to add TextWrangler to the path environment modifying the file .bash_profile. This is what I have added: # Just a comment PATH=/Applications/TextWrangler.app/Contents/MacOS export PATH ...
1
vote
1answer
64 views

Recompiling bash to avoid shellshock seems to have messed up bash

I probably shouldn't have even messed with it, but I followed the instructions to recompile bash here: How do I recompile Bash to avoid Shellshock (the remote exploit CVE-2014-6271 and CVE-2014-7169)? ...
1
vote
1answer
1k 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 ...
4
votes
1answer
342 views

How to mitigate Bash risk while waiting for a patch (sans a recompile)?

This is related to How do I recompile Bash to avoid the remote exploit CVE-2014-6271 and CVE-2014-7169?, Are Macs vulnerable to the Bash shellshock bug? and Are Bash, Bourne, and Korn shells compiled ...
3
votes
6answers
1k views

Can bash be replaced entirely in OS X?

Because of CVE-2014-6271 and CVE-2014-7169 on OS X I was wondering: can bash be replaced entirely by another, non-affected shell (eg dash or others)?