The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

1
vote
1answer
51 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
96 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
102 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
34 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
178 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
54 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
250 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
32 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
49 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
135 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
656 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
64 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
44 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
55 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
67 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
64 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
111 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
41 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
149 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
136 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
17 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
54 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
29 views

Delete old backups alike Apple Time Machine does [duplicate]

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
96 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?
2
votes
1answer
656 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
281 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
134 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
50 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
97 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
269 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
313 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
199 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
157 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
166 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
56 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
174 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.
1
vote
2answers
660 views

Shell not finding commands after I changed my .bash_profile file

I was following a tutorial trying to install Laravel (5.0). The tutorial showed to add export PATH="~/.composer/vendor/bin/laravel" to the .bash_profile document. Since then, I am not able to execute ...
3
votes
1answer
86 views

How do you close a file that you've opened with /usr/bin/open?

I've opened a PDF file with /usr/bin/open, and now I'd like to close it from the command line. (I'm writing a script.) How might one go about doing that?
1
vote
0answers
26 views

Terminal command not found [duplicate]

So I was going thru RoR tutorial, installed heroku, heroku toolbelt. I got an error message from Heroku to update to newvest Git for safety reasons. I tried that with installer but heroku version ...
1
vote
1answer
171 views

In Bash, can I output text from cut into a new command?

This might be a vague title, but it's hard to explain what I'm doing in a short title. I have a tool that removes adware and it mainly runs in bash. Some of the programs I want to kill may have ...
1
vote
1answer
230 views

`find` finds nfs server?

I had to run find / -name foo > found.txt and stumbled over the following output: ... find: /Volumes/MobileBackups/Backups.backupdb/mac/2014-12-17-162004/MacRoot/.DocumentRevisions-V100: ...
1
vote
0answers
86 views

dtruss -f is not following children processes?

Following is not following the child "sql.py" python process: sudo dtruss -f run-test sql.py 2>&1 Here is the output - which shows no evidence of following the invoked python: PID/THRD ...
0
votes
0answers
33 views

MAC: Icons only work on symbolic links when locked and are not updatable - need method for unlocking for non-privileged user

My client has a product based on Excel Spreadsheets which require periodic downloads. The product has been working well on PCs for several years, but there has been a lot of requests to have the ...
0
votes
1answer
483 views

Applescript to replace string using sed

I need and Applescript to replace some text as follow: Original text: string  string  string  $  text1 string  string  string  $  text2 text3 string  string  string  $  text4 The ...
2
votes
1answer
253 views

How to change the default command to open shells in the MobileTerminal Cydia package

I am using MobileTerminal on iOS 7, and want to know how to change the default shell from sh: to bash:. I assume I would need to change the login command for this, but how would I?
0
votes
0answers
177 views

Mac Reset Password Prompt/Script

So, I'm setting up Mac's for new users. I create their profile and give a default password (the same one) to each new user. My question is, when the user goes into the computer for the first time(it ...
0
votes
0answers
16 views

Add a path to the system PATH [duplicate]

Please help me figure out how to set a system wide PATH..... I have upgraded svn to version 1.8.10 on osx 10.9 One of the required steps was adding the address of the current svn to the PATH. ...
0
votes
0answers
50 views

Need help fixing bus error in Eclipse Java? possible Pathway problem

Whats up folks, i have posted this question on other forums but got no reply, just note before you read, my terminology is not the greatest, im only studying IT this year, so my knowledge be still a ...
0
votes
1answer
36 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 ...
1
vote
2answers
64 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 ...