The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

1
vote
2answers
24 views

does iphone5 have a terminal?

I'm new to iphones and mac, but I pretty ok with Linux. I think I could solve some of my networking issues, if I could just get into a bash shell, but I haven't been able to locate a shell. Is there ...
2
votes
1answer
8 views

Wrong working directory, if bash script is opened via double-click

I wrote a bash script in order to directly start eclipse from different workplace locations. Each workplace contains the script, after running it, eclipse is started with the respective workspace set. ...
0
votes
1answer
19 views

Mac: Regular expression to parse scutil command output

I've below output from scutil --nc show <service id> Connected Extended Status <dictionary> { ConnectionStatistics : <dictionary> { ConnectCount : 6 ConnectedCount : 3 ...
0
votes
0answers
18 views

Automator Calendar Action to Launch Shell Script in Background

First and foremost: Everything works, automator launches when it is supposed to, the shell script executes, and I get the results I am looking for. Where the problem comes in to play is that the ...
1
vote
1answer
14 views

Bash automatically creating () and ()! files

I noticed that the Yosemite system has been creating files with names just "()" and "()!" in places where I recently made bash commands and want to know why. I can't even delete them use rm as after I ...
0
votes
1answer
54 views

To install Shotwell in OSX

I install the first dependencies of Shotwell successfully brew install libGphoto2 vala libgee Some discussion about this issue in this thread but the accepted answer is misleading, since it is ...
2
votes
1answer
116 views

To install Brew's ImageMagick and fix its Symlink

Assume you installed Imagemagick by brew install imagemagick but it does not get into your PATH. For example, I run unsuccessfully compare since imagemagick is not in PATH: -bash: compare: ...
0
votes
0answers
7 views

Recursively remove trailing space on all files and folders [duplicate]

I want to recursively remove trailing space on all files and folders. ruby -e "Dir.glob('* ').each { |name| File.rename name, name.chomp(' ') }" works for PWD. How do I run it on the whole ...
2
votes
1answer
22 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 ...
2
votes
1answer
28 views

Open application from terminal and remain linked to the process (like Linux) so when CTRL+C is sent to terminal the application closes too

I have an application (closed-source tool not developed by me) which requires another process to exist before executing properly. When I quit this application, I also want that custom process to be ...
2
votes
3answers
44 views

How to add MySQL to $PATH variable to resolve “mysql: command not found”?

I installed MySQL on my Mac, and now I would like to add it to my $PATH variable. I want to be able to type mysql anywhere. I tried adding the following to my .profile file: export ...
0
votes
1answer
13 views

Running Unsupported Applications Natively

How do I run a bash file such that the application that open appears to be native? For example I am running an old version of iMovie HD in Yosemite. I would like to open the application as if it was ...
1
vote
1answer
39 views

IF statement doesn't work properly in osascript

I'm working on script which should do something if application is running or not Also there should be a timer of checking(60 seconds) The problem is that "if" statement which is checking "count" ...
2
votes
0answers
40 views

Set file metadata attribute values

I'm trying to set the values of some file metadata attributes in OS X Yosemite - kMDItemDateAdded and kMDItemLastUsedDate - the values of which can be shown using mdls <filename>. I'm trying to ...
1
vote
1answer
30 views

Preview image from pipe

I have a command line utility, let's called as: produce_image. So i can do the following in the Terminal: $ produce_image > some.jpg $ open some.jpg #opens Preview.app also, I have ImageMagick ...
2
votes
1answer
41 views

How to unfreeze terminal when SSH connection dies?

I"m using Mac 10.9.5 with bash shell. Occasionally when I ssh into another machine and then the connection dies (e.g. the Internet goes down or I move to a new location), the terminal window with the ...
0
votes
3answers
24 views

How do I change the path that is being searched for launching an application?

I am trying to launch the D programming language compiler DMD, but the terminal is giving the following error: dmd: failed to launch executable at /Library/Compilers/dmd2/osx/bin/dmd But there's ...
2
votes
0answers
20 views

Determine when an application last launched

I need to have a script return a date that a particular application launched (in this case Parallels, but solution should be non-specific) so that our asset management system can mark the license for ...
1
vote
1answer
50 views

How to list Network Interface UUIDS?

I'm trying really hard to find a simple way to fetch all network UUIDS on my Mac to be able to do some plist magic. Is there a command to do such a thing? If I look in the plist I'll find for an ...
0
votes
1answer
28 views

Changing volume at command line using script/function

I found this nifty command which sets volume to 50% (or any level desired): osascript -e 'set volume output volume 50' I'd love to have a script or function that lets me type v 50 or v 30, etc. to ...
2
votes
2answers
58 views

Terminal/iTerm2 issue: reverse-i-search trims off command

I've been having this issue since 10.9. cd into a reasonably long path, e.g., cd /Volumes/Storage/backup/long/path Enter a moderately long command, e.g., curl -X GET http://localhost:8888 ctrl+R, ...
2
votes
1answer
27 views

Is there any way to let apple know shellshock patch download is broken?

I am trying to patch Lion (10.7.5). According to shellshocker.net, I am vulnerable to 6 out of 7 possible exploits. The download link for Lion is broken: ...
0
votes
1answer
23 views

How to open different emacs version from the shell?

I have two versions of emacs on my machine. One came preinstalled and I have just installed a newer version with homebrew. If I type emacs in the terminal, the old version runs. If I type ...
1
vote
1answer
36 views

Automator service: delete last page from PDF with use of pdfsplit via bash

I would like to design a simple Automator service that would delete last page from PDF passed via finder. My proposed syntax for the Shell Script is: for f in "$@" do pages=`pdfcount "$f"` ...
1
vote
2answers
89 views

Why `echo -n` doesn't work in this script on mac terminal?

I am learning shell from tutorialspoint today:http://www.tutorialspoint.com/unix/unix-shell-loops.htm And I copied this code block to a loop.sh file: #!/bin/sh a=0 while [ "$a" -lt 10 ] # this ...
1
vote
0answers
27 views

Bash script to import RootCA and set it to Always Trust from Server

I am working on a way to import a RootCA into the login keychain of OS X and set it to always trust, the cert is located on a file share server. I am relatively new to the whole Bash scripting scene ...
0
votes
2answers
27 views

File extension shows in BASH but not in Finder

I created a text file with a specific extension: Vendor_0408_Product_3008.idc It displays in finder link this: and BASH like this: -rw-r--r--@ 1 raven staff 1903 Feb 19 10:31 ...
0
votes
1answer
26 views

I get “command not found” when running a new shell, (and none of my aliases, etc. are noticed). What's wrong with my .bash_profile?

Terminal.app Here are the my preferences settings: !/Users/Parker/Desktop/0.png !/Users/Parker/Desktop/0.5.png !/Users/Parker/Desktop/1.png !/Users/Parker/Desktop/2.png Here is the contents of my ...
0
votes
1answer
40 views

osx service for `mpc add`ing files to mpd’s playlist

I’m trying to create a service in automator, which allows me to add files/folders from Finder directly into my mpd playing queue. I tried the following, the command runs, but nothing happens. ...
2
votes
1answer
46 views

Open Terminal.app but hold open?

I have a shell script that runs on my mac (./go), it opens a ssh session on a raspberry pi then runs a script which streams video from the raspberry pi to a UDP port on the mac. I also need the mac ...
1
vote
0answers
32 views

How to use nohup/send process to background on os/x

The command nohup <command> & does not actually work properly on mac it seems: the process is suspended. Issuing fg appears to be required to reactivate the command. Here is an ...
0
votes
0answers
31 views

Software Recommendation: Menu bar app to run saved bash scripts

I am looking for a an app that has a dropdown menu from the menu bar to run bash script snippets. Does something like that exist? Thanks in advance!
1
vote
0answers
72 views

Problems with a simple shell script

I've faced with the problem of using simple shell commands like AWK and print within my sh scripts on my Mac ( the same script works perfect on the Linux). For instance below script which seek for the ...
0
votes
0answers
70 views

Why am I getting command not found even though path to command exists in PATH variable?

On Mac OSX 10.10.1 I get command not found for anything installed in /usr/local/bin (however command is found if I use sudo) PATH variable contains this path. for example pip. Here are some lines from ...
1
vote
0answers
12 views

Window UI Texture Artifacts

I just install OSX Lion on an old Mac Pro, as well as all the major updates 10.7.1 through to 10.7.5. Then I installed the BASH Shellshock patch for OSX Lion 10.7.5 and after restarting my Window UI ...
0
votes
0answers
30 views

How Do I Override the Addition of the folder for the Server app version of PostgreSQL?

I am currently using RVM for managing different gemsets for different versions of Ruby. RVM has made changes where the RVM folders must be listed first or else I have to manually set the gemset each ...
0
votes
0answers
26 views

Delete old backups alike Apple Time Machine does

Time Machine saves hourly backups for the past 24 hours, daily backups for the past month, and weekly backups for everything older than a month until the volume runs out of space. At that point, Time ...
1
vote
2answers
37 views

find -printf work around

I'm trying to use a script to call compare file size. Unfortunately the version of find on my mac does not support the -printf switch. Any suggestions?
1
vote
1answer
271 views

OSX 10.10 Python crashing from bash

When I run Python through bash it keeps seg faulting on me. The crash happens for example if I just type >>> "\n \n, but also for a lot of other cases. From my limited understanding of the ...
1
vote
3answers
110 views

Shell script to restart a certain process if it is not responding

I need an java application to run 24/7 on my mac. Unfortunately the JVM process sometimes gets stuck and thus the java application does not respond anymore. Is there a possebility to detect if a ...
1
vote
1answer
51 views

How to upgrade bash to v4.0+ properly?

I'm on OS X 10.10.2 and $ /bin/bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14) Copyright (C) 2007 Free Software Foundation, Inc. How to upgrade bash to v4.0+ properly? ...
0
votes
2answers
27 views

File contents remains in terminal after exiting Vim?

I'm using the stock terminal with zsh and vim. After I exit vim, the file contents remains in the terminal. Ideally, only the previous history would be in the terminal when I exit vim (such as the ...
0
votes
0answers
70 views

Mac OS X launchd: forbid starting a process in Power Nap (dark wake)?

What would be the best way to forbid Mac OS 10.10+ Launchd to start a Bash script when a MacBook is in Power Nap (dark wake)? Is there an elegant way to limit it only to "real wake", like: ...
2
votes
1answer
128 views

Move all contents from a folder to another with shell script

Why does this work? mv /Users/diogosaraiva/Music/Youtube/Novas/* /Users/diogosaraiva/Music/Youtube/Tratadas …but the commands below don't work? mv "/Users/diogosaraiva/Music/Youtube/Novas/*" ...
0
votes
1answer
90 views

Tab completion for hosts defined in ~/.ssh/config doesn't work anymore on Yosemite

I'm trying to create my ~/.ssh/config file for simplify my work life on the server connection. In Mavericks all worked properly and with the tab I was be able to autocomplete the hostname with file ...
0
votes
1answer
85 views

Programmatically Change Screen Saver “Start after” time

I would like to change the time before my screen saver starts based on WiFi network. I am running Yosemite (10.10.1). I will use Keyboard Maestro to trigger the action. I need to find the correct ...
1
vote
1answer
95 views

Problem persistently defining aliases in terminal

I am trying to persistently define some aliases for my everyday terminal use. I started off with this tutorial: How to persistently define aliases in Terminal, more precisely with Mike's comment. As ...
2
votes
1answer
47 views

Using Terminal to order SSID preference in System Preferences

I'd like to find a way to add a specific SSID to the top of the preferred WiFi networks in System Preferences > Network > WiFi > Advanced. (10.9 Mavericks and beyond) According to the man page, this ...
1
vote
0answers
30 views

Is HISTFILESIZE behavior different in Yosemite?

For a long time I've used the HISTFILESIZE environmental variable to control the number of lines that get written to my terminal history (the default of 500 is not enough; I set it to 10000). Ever ...
1
vote
1answer
76 views

Where is the bash profile on iOS?

Where is the bash profile on iOS, I am jailbroken and can't find the bash profile, I would like to create some aliases and edit it.