The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

0
votes
1answer
12 views

Textmate's Filter Through Command

I run anything there on document or selection I get /bin/sh: pandoc: command not found I installed pandoc by brew install pandoc My pandoc's version is 1.13.2.1. There is probably ...
1
vote
1answer
30 views

Set Bash Variable as Icon in osascript -e Display Dialog with icon

I have a bash script that utilizes some osascript -e code for a dialog. I want to use a custom icon in that dialog. However, I don't understand how to code it so it's completely portable so as to make ...
1
vote
2answers
23 views

Automated screensaver configuration in command line/shell script

So I'm configuring some Default User Template LaunchAgents to configure a default screensaver for some of my company's most popular fan art. (It's actually been really well received by the team). ...
0
votes
1answer
24 views

Some aliases return 'No mapping found'

After editing .bash_profile, .bashrc, .inputrc dotfile config my aliases went silly. Some aliases work as expected. Others for no apparent reason return: No mapping found Press ENTER or type command ...
0
votes
1answer
38 views

-bash: command not found appears every time

I just recently discovered what terminal was. I started using it today and every time I try a command (like shh) it says that the command was not found. I was instructed to type in echo $PATH and this ...
2
votes
2answers
53 views

What does adding PATH to .bashrc do?

I'm following this guide to install Linux commands onto my OS Terminal: https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ and I see that the second line tells ...
0
votes
1answer
31 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
14 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
40 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
153 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
23 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
31 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
62 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
17 views

Need Help with Post-install 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 ...
2
votes
0answers
13 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 ⌘ Command+Delete = delete line backward, ⌥ Option+left arrow = "move cursor back one word" and ⌥ Option+Delete = delete word ...
-1
votes
1answer
47 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
81 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
83 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
178 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
31 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
86 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
37 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
40 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
39 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 ...
1
vote
1answer
140 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 ...
3
votes
1answer
886 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
8 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
38 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
48 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
115 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
15 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
57 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
70 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
51 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
39 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
30 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
97 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
39 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
97 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
31 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
31 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
70 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
199 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
39 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
34 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
38 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
48 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. ...