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
2answers
696 views

Can't exec “glibtoolize”: No such file or directory

I have a shell script autogen.sh, I run it under my project directory in terminal: ./autogen.sh I get error: Can't exec "glibtoolize": No such file or directory at ...
1
vote
1answer
168 views

What's the BSD equivalent of the linux date command for adding subtracting days/weeks/months from a given date?

I have a given date, such as 2013-10-31 and I need to accurately determine the next day (taking into account DST, leap years, leap minutes, timezones, etc). I also have now way of knowing if the date ...
2
votes
1answer
957 views

Trouble in Automator's Shell Script after OS X 10.9 Mavericks upgrade

I've got a problem. I use from lot of time an Automator's shell script: cat >> ~/Dropbox/ClipBoard/Appunti\ Mac\ del\ $(date +\%Y-\%m-\%d).txt It ever worked but, after Mavericks upgrade, ...
0
votes
1answer
144 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 ...
1
vote
2answers
859 views

Symbolic links, why doesn't this work:

me$ ln -s ~/x/y/ ~/Desktop/ ln: /Users/me/Desktop//: File exists Why does this attempt at creating a symbolic link to ~/x/yon the Desktop now work? The only way I can seem to get something like a ...
1
vote
2answers
2k views

User input assigned to variable in AppleScript then passed to “do shell script” command

How do I grab input from the user in AppleScript and then pass the result of the variable to a do shell script command from within AppleScript itself? For example, the user would type the answer foo ...
0
votes
3answers
314 views

Batch-processing Image Files in a Folder using a folder action with Automator

I'm trying to resize new image files in a folder using a folder action so the files that were already resized to 300x250 don't get resized again. The thing is I'm having issues getting the resizing ...
1
vote
0answers
266 views

Where does Transmission store logs for called scripts?

Transmission has an option to run a shell script when a file finishes downloading. I'm wondering where to look for logs for it – it seems like it only executes half of my script but can't figure out ...
0
votes
1answer
228 views

Which background processes can I disable to speed up my Mac

If I'm on an old Mac and I just want the basics (web browsing, text editing, multitasking) to run a lot faster and I don't mind losing out on bells and whistles or temporarily disabling unneeded ...
0
votes
1answer
104 views

How Can I Set XCode to Correctly Highlight Multi-Line Strings for Shell Scripts?

Quite simply I have a shell script that I'm editing in XCode, and it contains several strings which contain new-lines. Easiest way for me to do this was just to leave the string open so that it spans ...
0
votes
1answer
248 views

Launch script after command finishes

I find myself running some long scripts/commands and I don't want to wait looking at it until it finishes. On the other hand, I would like to know right away when it ends. I know you can do the trick ...
2
votes
1answer
133 views

Search files across folders and move recursively to new folder

I need a way to search from a base folder, all the folders inside of that one recursively, and find all photos of JPG and PNG that were created before a certain date (01.Feb.2013) and then move them ...
9
votes
2answers
8k views

Run AppleScript from bash script

If I wanted to run an AppleScript from within a bash script I could call a file with the list of commands that I require to execute. #!/bin/bash {some commands} osascript file.scpt {other commands} ...
5
votes
2answers
2k views

What does -HUP do when used with killall?

Sometimes when I'm running a killall command from Terminal, a co-worker would suggest or edit my scripts to show killall -HUP. What does the -HUP part do?
4
votes
2answers
409 views

Pipe output of grep to a variable

I need to be able to write whether the test for a grep is either TRUE or FALSE to a variable so I can use it later For the following, if I run defaults read com.apple.Finder | grep ...
0
votes
2answers
5k views

line 1: syntax error near unexpected token `newline' with HTML + shell script

I've been learning the shell with a great tutorial, linuxcommand.org. After a lot of learning and practice with navigating directories, editing files, etc, I've moved on to writing shell scripts. One ...
6
votes
4answers
735 views

Shell script to determine the file size in a folder recursively

Can anyone provide me with a shell script that I can run against various folders to see where large files are lurking? Many thanks
9
votes
1answer
304 views

Is it possible to set the output language of shell commands to anything other than English?

Am I correct in my assumption that shell commands such as cp, man, ls, etc. always print their messages in English regardless of system and user settings, and also standard shell messages like ...
0
votes
0answers
225 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
2k 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
252 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
155 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
427 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
1k 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
34 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
654 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
131 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 ...
6
votes
2answers
1k 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
200 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
372 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 ...
5
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
217 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
526 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
161 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
296 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
114 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
140 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
51 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
428 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
71 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
85 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
630 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
5k 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
4answers
5k 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
174 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
331 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
143 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 - ...