A type of user interface for a computer. This can be both command line or graphical user interfaces. More commonly, shell often relates to the command line interface.

learn more… | top users | synonyms

0
votes
0answers
180 views

how to activate yadr after installing `ho my zsh`?

I have installed yadr and then ho my zsh how do i revert and activate yadr ? I have googled and found only how to uninstall ho my zsh: ...
0
votes
1answer
1k views

Automator won't execute my bash shell script

I have a bash script that works like a thread. Now I'd like to turn it into a service with Automator. Input is set to Image Files in Automator and the shell script action is set to Pass input as ...
2
votes
1answer
217 views

How can I systemwide check if a keyboard shortcut is in use or has been registered?

How can I query OS X to know if an application has registered a shortcut? I could inspect every app I have or that is running at least with KeyCue and go through the Keyboard Shortcuts section of ...
0
votes
1answer
122 views

Simple Script for URI Handling

Basically what I'd like to know is how can I setup a shell script (or an Applescript or Automator wrapper for a shell script) as a protocol handler for a custom URI (so clicking them will trigger my ...
1
vote
1answer
290 views

Automator to execute shell script with an input text file, copy it to specific directory

I'm simplifying making a .deb file with Automator. I currently have a shell script that does some simple actions - Ask the user for text input Do some directory parsing Execute a command with the ...
2
votes
2answers
770 views

My Automator Workflow fails because it fails to find the git command within the 'Run Shell Script' command? Need help

I have an Automator workflow and one of the actions is to clone a repository. Here's the code for the 'Run Shell Script' action. The command is run within the Bash shell /bin/bash if that matters: ...
0
votes
0answers
33 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 ...
2
votes
2answers
552 views

Create a automator application able to launch and quit from dock

I have a shell command thats runs endlessly, until you stop it using Control-C. When I run it from the Terminal, it goes something like: $ /abspath/to/my-command Command is running ... Use Control-C ...
0
votes
1answer
123 views

Set environment variable for the process before startup [duplicate]

I have the following situation: I have Mac OS bundle with application which uses some 3rd party dylib's and those dylib's depend on some env variable, let's name it ENV_VAR. I want to set ENV_VAR to ...
3
votes
2answers
426 views

Are Bash, Bourne, and Korn shells compiled into one binary in OSX?

On OSX 10.8, if you compare the binaries for bash, sh, and ksh, a few different shell options, they are the same size. If you take it further and cmp the binaries, there seems to be only a ...
0
votes
3answers
192 views

Is there a package management system for shell scripts on Mac OS?

Is there a package system (think npm, cpan, or even homebrew) that would be suitable for shell scripts?
3
votes
1answer
355 views

In Mountain Lion why do remote shells via ssh do NOT inherit the environment of the launchd parent process?

When logging in to my Mountain Lion Mac remotely via ssh I do not get the same PATH variable as when I open a shell locally: The local shell inherits its environment as expected from launchd and ...
4
votes
2answers
2k views

Change default shell from bash to zsh

I've tried to switch my default shell to zsh, using chsh: chsh -s /bin/zsh and: chsh -s `which zsh` Both commands ended with: Changing shell for adamatan. Password for adamatan: chsh: ...
0
votes
1answer
49 views

Something wrong with the root shell

Today, I've tried opening a root shell and, oh surprise, weird answer... Any idea of where it could be from ?
6
votes
1answer
198 views

“Libraries” (a la Windows 7) on OS X?

There's one feature from Windows 7 that I sort of like (yeah, yeah, I know...) and would like to implement (differently) on OS X. It's what they call "Libraries". It allows you to have the contents ...
0
votes
1answer
444 views

Why would SetFile be unavailable after upgrading to Mountain Lion?

I have Xcode installed, and have used the SetFile command (installed with Xcode) for some time. I just upgraded to Mountain Lion, though, and find that it is suddenly unavailable. I verified that ...
-2
votes
3answers
134 views

How to source a file in Mac

I'm from the Linux world where if I want to source a file I type for example: 'source /etc/profile' How do I do this in Mac?
3
votes
1answer
257 views

how to get ls to list files in case-insensitive order?

How do I get the ls shell command to list my files in: case-insensitive order with the directories at the top? The reason I ask is: I want Aquamacs Emacs dired to list my files and directories ...
3
votes
1answer
111 views

mac asking password after cd in terminal

Recently my mac has started asking me for a password after I use cd in Terminal.app (haven't tested other term apps). strangely though, if I press ctrl-C when the passowrd is asked, the question goes ...
1
vote
2answers
1k views

How to Run Shell Script upon Application Launch?

Not sure if this belongs here or on SuperUser, but it's Mac specific, so I'll go with here. I wrote a Ruby script that edits TextMate's global properties file and changes the theme based on the time ...
0
votes
1answer
123 views

Determine geolocation in shell / Terminal on OS X 10.5

Is there a way to determine geolocation in shell / Terminal on OS X 10.5? There's another question, Is there a way to access a Mac's geolocation from terminal? (Mountain Lion), but it seems to ...
1
vote
1answer
47 views

How to change some information in a shell prompt.

I opened my terminal and saw a shell prompt. Last login: Fri Feb 15 15:28:16 on ttys000 john:~ voloda2$ How do I change john to alex?
2
votes
3answers
1k views

How to determine the absolute path to a file in a shell script

I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files. I need a fail-safe way to turn all those passed paths into absolute ...
0
votes
0answers
387 views

How to make shell extensions in mac os x

Is there an equivalent of context menu extensions for mac os? I would like to port mine from windows. An example would be the context menu entries for 7-zip or winzip. Specifically I would like to ...
1
vote
0answers
65 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
1answer
81 views

How to manually determine version control metadata for Finder?

I have a Scripts folder where I keep Automator actions, Applescripts, and shell scripts. Automator scripts are automatically assigned a version of 1.1.1 it seems. When I make revisions to any of these ...
0
votes
1answer
575 views

How to use automater to run mongo db and node.js app on startup

I'm trying to use Automater(first attempt of using this software) to create a sequence that will automatically run ./usr/mongo/bin/mongod and ./usr/mongo/bin/mongo then run my node.js server app at ...
4
votes
2answers
4k views

Editing System Preferences via Terminal

Am looking to edit system preferences settings via the command line but cannot for the life of me find the correct names of variables. In Login Options under Users & Groups, I would like to be ...
5
votes
3answers
3k views

How to reset $PATH?

I was trying to add something to $PATH and it went totally wrong. I now can't run any commands such as ls. I've looked at this answer and used the following lines: ...
0
votes
1answer
173 views

TimeMachine restore issue

Times ago I did a "restore from time machine backup" in order to restore all my files on a new SSD I bought for my macbookpro (with OSX Lion), and all went fine. Today I installed Mountain Lion on ...
0
votes
0answers
299 views

A working applescript fails when running via cron

MacOs 10.8.2 I have 2 applescripts shown below. They are arranged in one shell script to run one after another by using osascript (just to simplify the example). Everything works fine when starting ...
3
votes
1answer
135 views

Detecting that a script is run within ARD

Does anyone know of a way to detect that a shell script is running within ARD (vs. running the same script locally on the machine)? I looked at detecting that we are running in interactive mode - ...
2
votes
1answer
2k views

How can I open Google Chrome in Presentation mode using a shell script

Previously in 10.6.8, I was able to start Google using open /Applications/Chrome.app --args --kiosk http://www.google.com Now, on newer systems, that does not work anymore correctly. The only way to ...
0
votes
1answer
166 views

Script to Update/download most recent iTunes podcast WITHOUT opening iTunes at all?

I have a couple favorite podcasts that I subscribe to in iTunes. I'm using You Control (so I don't have to open iTunes to play my music). I'm using Keyboard Maestro. I've made a macro that runs ...
1
vote
1answer
591 views

How do I make terminal sessions resume on Lion with iterm2 and tcshrc

My understanding is that with Lion my terminal windows should restore their state. However, this does not happen for me. I wonder if this is because I use tcsh instead of bash? Is there something I ...
3
votes
1answer
5k views

How do I find what packages I've installed via terminal?

I've been learning the shell for a few weeks and have installed several packages. I know/remember what some of them are, like oh-my-zsh and emacs 24 (which was a nightmare to upgrade to), but not sure ...
0
votes
0answers
300 views

License problems installing aquaterm via macports

I am trying to install aquaterm via macports. I run sudo port install aquaterm This gives back an error: ---> Building aquaterm Error: org.macports.build for port aquaterm returned: command ...
5
votes
1answer
309 views

How to isolate the most disk-active process(es) in OS X?

I have some process(es) performing a lot of drive access from time to time, however I've hitherto been unable to isolate which process or processes are performing the access. What shell command can I ...
1
vote
2answers
838 views

Why sh -c 'echo -n 1' is different from bash -c 'echo -n 1'

I am on a Mac Book Air, OSX 10.8. I am trying to understand why these two snippets do not print the same output. sh -c 'echo -n 1' outputs -n 1 whereas bash -c 'echo -n 1' outputs 1 as expected. ...
1
vote
1answer
253 views

How can I make autocomplete in the shell work with case-folding?

How can I make the autocompletion for files and folders in the bash shell work case-insensitively? Ideally, cd ~/doc + tab autocompletes to cd ~/Documents (correcting the case as it autocompletes), ...
2
votes
2answers
423 views

How can I reproduce the Finder sort order without asking Finder to sort for me?

I work with a large collection of mostly-text files subdivided by series, periodically mirroring them from an upstream repository and repackaging them using a shell script from a slightly chaotic ...
1
vote
2answers
108 views

How can I do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion?

I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else. I am presently filtering ...
3
votes
1answer
907 views

How to fix lsregister failing associations after reboot? [duplicate]

Possible Duplicate: How do I remove duplicate “Open With” context menu items in Finder.app? I'm running 10.7.5 and I have noticed a problem with associations between files and applications. ...
1
vote
1answer
142 views

logger vs syslog -s

What exactly is the difference between using logger and syslog -s? According to its manpage, logger provides interface to the system log module, but I can't really see the point given that syslog(1) ...
2
votes
1answer
649 views

dyld message when launching commands as sudo

When I launch a command from the shell as super user I always get back the following message: dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or ...
1
vote
1answer
304 views

How do you prevent CodeRunner from prefixing its console output with [00m[00m[00m[00m[00m?

There seems to be a connection between CodeRunner's console output and your actual terminal prompt script, that is, if such prompt code is sourced from e.g. ~/.bash_profile (which CodeRunner reads by ...
1
vote
1answer
124 views

Colorful make compilation output

When I used Ubuntu, I remember that the output of make/gcc/g++ had nice colors, which were particularly helpful when needing to quickly identify errors (they were red). Is there a way to enable ...
2
votes
2answers
530 views

Exclude files from “central metadata store”

I'm fairly familiar with the mdfind utility. I find it's very useful when I can't find a file or when I need to find a file with certain contents. The problem is that I need to exclude some files from ...
6
votes
4answers
2k views

How to prevent Mac sleep from command line?

I have a long running script at the remote computer. I don't want terminate my ssh session, and need enter it into a shell script. How is it possible to prevent my Mac from falling into sleep from ...
5
votes
2answers
532 views

How can I have my shell always start in a certain directory that is not my home directory

I've tried putting cd /Users/my_name/my_directory/structure in both .bashrc and .bash_login but neither works, i.e. when I open a new terminal window I am in my home (/Users/my_name/) directory. ...