The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
18 views

bash- command not fount error

I tried to install omnet++ on my Macbook pro (OS 10.10) yesterday. I got an error so I delete path in my bash-profile. Now, every command I try to run in my terminal shows an error of command not ...
1
vote
1answer
9 views

generic approach to finding the correct name to run an app from the command line

Whenever I am not in a browser or in my text editor, most of my time on my mac is spent on the terminal. What's a quick, generic way to figure out how to run a gui program from the bash shell? It ...
0
votes
1answer
28 views

Is it possible to enable Code Folding in Xcode for Bash scripts?

I work a lot with bash scripts and some of them can get pretty lengthy. Up until now, I've been using BBEdit as my editor of choice because of the way it handles locked files and permissions. But ... ...
2
votes
2answers
70 views

How to find .bashrc or .zshrc?

I just got a MacBook Pro and am in the process of trying to get GNU commands installed. I'm following this guide, but I don't know how to do: Then add the following line to your .bashrc or .zshrc: ...
2
votes
0answers
22 views

Is there a way to run a bash script everytime I print something?

I wanted to run a script that changes my background image whenever use the printer. Is it possible? Is there a way to know when OS X is printing something?
0
votes
0answers
19 views

Creating Smart Folders (perhaps programmatically) based on photo IPTC metadata?

I have thousands of photos with IPTC metadata -- I'm mostly interested in the star-ratings and the tags -- and I'd like to create folders for those images that automatically stay in sync as I change ...
0
votes
2answers
45 views

Launchctl says plist is invalid, plutil says it's OK

I'm trying to have launchd run a shell script when I join a new WiFi network. I've created this plist file (closely based on this SuperUser answer) at ...
0
votes
0answers
8 views

Need Help with Postinstall Script to Switch Off “Displays have separate Spaces”

We have an PC application adapted to run on the Mac using Wine that we install using Apple's Installer. Because Wine uses X11 to display the adapted application's GUI and because of the way X11 (aka ...
1
vote
0answers
8 views

In iTerm, how can I change alt+delete to ignore slashes?

I set up my iTerm to work a lot like OSX does in other text fields, eg cmd+delete = delete line backward, alt+left arrow = move cursor back one word and alt+delete = delete word backward, but the way ...
-1
votes
1answer
34 views

How to create a bash alias on OS X?

I want to create a bash alias on OS X, because I need to type on a really large command. I've found some answers about the same issue on ubuntu, like this one, but they mention the ~/.bashrc file, ...
3
votes
1answer
56 views

How to schedule run of .command file (bash)?

I have a bash script (saved as myfilename.command) and would like to schedule its run. I've tried to use Calendar event for this (which works fine with Automator scripts), but I get the following ...
0
votes
0answers
24 views

Any verification tricks for Mac OS X files?

Is there a good way to verify the various files in Mac OS X? Ideally, one wants to verify system files in an installed system, but right now I'm curious about verifying the Yosemite installer. If ...
1
vote
1answer
51 views

How to Use Cancel Button in Osascript to Stop Running Script

Here is my basic script: #!/bin/bash osascript -e 'tell application id "com.apple.systemevents"' -e 'display dialog "Do you want to continue?" & return & return & " Please wait..." ...
2
votes
1answer
177 views

How can I print a path with a home directory replaced by ~ in terminal?

How can I print a path in Terminal with the home folder path replaced by a ~? pwd /Users/denz/projects/coolApp But I want to something like this ~/projects/coolApp
1
vote
1answer
29 views

CLI options do not work if passed at the end of command [duplicate]

In brief: ls -a /tmp works but ls /tmp -a does not. I recently started using Macbook Pro. Coming from a Linux background, command like ls /tmp -a seems perfectly fine to me. But for some reason ...
1
vote
2answers
82 views

Does iPhone 5 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
24 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
35 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
28 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
15 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
86 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
420 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
34 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
34 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
65 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
14 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
49 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
49 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
34 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
45 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
27 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
24 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 ...
2
votes
1answer
77 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
34 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
80 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
29 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
50 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
114 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
34 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
31 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
30 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
42 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
47 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
44 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
34 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
88 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
79 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 ...