The default Unix shell used by Terminal in Mac OS X

learn more… | top users | synonyms

3
votes
3answers
286 views

Compare multi-digit version numbers in bash

Trying to write a script that searches for the version of the Application then returns the value. My problem is the value is three to four intergers long (example 4.3.2). I have searched for a while ...
2
votes
2answers
204 views

Does Mac OS X's bash read scripts for all users (tab-completion scripts) from /opt/local/etc/bash_completion.d path?

I stumbled upon some instructions in the book "Pro Git" It suggests: Download this file : https://github.com/git/git/blob/master/contrib/completion/git-completion.bash If you use the Bash ...
4
votes
1answer
223 views

declare -x messages appear in my terminal. How can I get rid of it?

declare -x Apple_PubSub_Socket_Render="/tmp/launch-qoybJQ/Render" declare -x Apple_Ubiquity_Message="/tmp/launch-DWchNf/Apple_Ubiquity_Message" declare -x COMMAND_MODE="unix2003" declare -x ...
3
votes
1answer
84 views

How to find delay when launching new Terminal (iTerm)

When I press CMD+N in iTerm2 to bring up a new iTerm window, sometimes it takes 10 seconds before I get my prompt. If I immediately repeat the process, the whole thing takes 1 second. To me this ...
2
votes
1answer
146 views

Homebrew: Easy way to add 'gnubin' to path for multiple packages?

I would like to use Homebrew to install GNU versions of several utilities, and use the GNU versions by default with their usual names. From the output of brew install gnu-tar and by reading How to ...
1
vote
1answer
27 views

Bash script to run command with prompt for input

How can I create a script using the following command? mmap -sn -n x.x.x.x/8, /16, /24 and so on. I would like the script to run the command when I type in "sweep" and then prompt me for the subnet ...
1
vote
1answer
57 views

How to invoke a script when closing any file with a given extension

Is it possible to automatically invoke a given applescript when closing -any- file with a given extension in a specified folder (and subfolders)? If not in AS, is this possible in bash? (The AS I am ...
0
votes
1answer
62 views

SIPS: Only Resize if Image is 315x300?

I'm currently using sips --resampleHeightWidth 250 300 "S1" to resize new images in a folder but I think that it might be resizing images that were already resized.. Is there anyway to know this for ...
0
votes
1answer
396 views

Allow the Terminal.app to pass command key based keystrokes to terminal programs

I want to allow programs running in the terminal the ability to interpret the keyboard short cut Cmd + S I have already Remapped the Terminals' default binding of Cmd + S to Ctrl + S via the ...
2
votes
0answers
60 views

Log software usage time on Mac OS 9 (Oct. 1999)

I'm needing to log the time a user spends inside of an application in Mac OS 9. I created a simple bash script "launcher" to do this, but then discovered OS 9 doesn't have bash installed. Here is the ...
2
votes
0answers
77 views

Terminal configuration lost after booting up

On OS X 10.8.3, my Terminal.app is configured with my .bashrc file. In my .bash_profile I have: source .bashrc It works great, except when I let some Terminal windows opened and shut down the Mac. ...
1
vote
0answers
34 views

Detecting that an external display is plugged in or unplugged on a laptop via bash

Is there a way via bash to detect that an external display has been plugged in or unplugged via bash? I know that I can create a crontab command that fires a script that uses the system_profiler ...
1
vote
0answers
55 views

What's the /home directory for, or did I just accidentally create it?

I saw reference to a bash command, cd /home, in a multiple choice quiz about navigating within Terminal. I tried it, expecting -bash: cd: /home: No such file or directory, but to my surprise it took ...
1
vote
0answers
57 views

Most efficient way to get all files in a directory

I have a million+ files spread across four fiber-connected arrays. I need to get the path, filesize, and last_modified date to insert into a mysql database. What would be the best way to do this? ...
0
votes
0answers
14 views

Convert absolute symlinks to relative ones?

I've seen plenty of threads on the Internet about doing the opposite, but what I want to do is, given a folder: /Lib/Foo/Bar.framework/Versions/1.5 And a symlink to it: ...
0
votes
0answers
21 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
0
votes
0answers
44 views

Opening Terminal shows a list of ttys - unable to use

Having the latest Mavericks installed, I tried to update PATH using nano and creating a .bash_profile file. I'm not sure what happened, but now when trying to run Terminal all that shows is a list of ...
0
votes
0answers
31 views

Cannot return to EOL after leaving in Bash vi mode

In terminal, after leaving the EOL in bash in vi mode, I cannot return to it, which makes it quite annoying to delete the last character. To replicate, with blank bash_profile and inputrc, set ...
0
votes
0answers
29 views

.bash_profile dont recognises commands even after some editings

Can someone tell me when I open a Terminal window if my .bash_profile is loaded (or readed). Each time now (dont know why) some cmds (ie: ls, man) are unknow. When I edit the file (I add : export ...
0
votes
0answers
31 views

Why nc doesn't response even if the “w” option set?

For some servers: nc -w 1 -z x.x.x.x 22 doesn't work. It has no response, but is looking like very busy: only ctrl + C can help. So -w 1 seems to be a useless option, to specify the timeout. Does ...
0
votes
0answers
40 views

Making checks before rsyncing external drive on OSX

I have the following issue on OSX though I guess this could equally be filed under bash. I have several encrypted portable drives that I use to sync an offsite data store or as an on-the-go data store ...
0
votes
0answers
991 views

using -exec command on mac os x

Does any know why the -exec does not work on mac os x lion terminal? It works on linux and other variants but not on mac os x find / -iname "*.mp3" -exec mv {} /mnt/mp3 \;