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

3
votes
1answer
119 views

What is the relationship between `launchctl limit` and `ulimit`?

There is not any ulimit configuration in system startup files/ shell startup scripts. ulimit -a shows: -u: processes 1064 -n: file descriptors 256 launchctl ...
2
votes
2answers
190 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
8
votes
2answers
548 views

Shell Script for Yesterday's Date

I'm trying to execute the following shellscript with hazel app on any file in the folder. It works, but the only thing thats causing a problem is the date for yesterday. #! /bin/bash saveDir="TJ" ...
2
votes
5answers
349 views

Set Services keyboard shortcut via script OSX

I need a way to set the following programmatically: Specifically for shortcuts under Services, if that makes a difference. I'm wondering if this is possible via shell or AppleScript? EDIT: I've ...
1
vote
2answers
214 views

What options does Terminal pass to bash on startup?

In the Terminal preferences, I'm able to configure the Terminal to "Open shells with:" -> "Command (complete path):" /opt/local/bin/bash. What options is the terminal passing when invoking this ...
1
vote
2answers
373 views

Single-user mode, data recovery, mount usb

I have a crashed hard drive. I had no luck with a USB to SATA using MacDrive Pro. I can get the drive to drop into shell with single user mode when I boot the drive. Can I mount a USB drive or ...
0
votes
2answers
366 views

what shell would you recommend using on mac? [closed]

I'm new to Mac (using Mavericks) i thought to install zsh. Do anyone has a recommendation for a useful shell for mac?
2
votes
2answers
117 views

How do I link/call an actual shell script saved within an Applescript app?

What's the correct syntax in the Applescript below to make this app run by double clicking on it rather than how it runs now by just running the Applescript in the AS script editor? The Shell script ...
0
votes
0answers
12 views

Command Line Tips and Tricks [duplicate]

==>> What are the most useful Unix shell "one-liners" that you use? <<== Here are a couple of mine to get the conversation started: 1. Repeat the previous command with a substring replacement: ...
0
votes
1answer
303 views

In iTerm, why is a command shell's command not picking up things on my $PATH?

I've got a script in my ~/.bin directory that changes iTerm's background before starting an SSH session (as detailed here, script slightly modified from this version). If I start a regular login ...
2
votes
2answers
111 views

Accessing a terminal when an interactive desktop session is unresponsive?

On linux distributions one can simply press the following keys in order to access the shell: Ctrl+Alt+F2 Ctrl+Alt+F7 to exit and return to the GUI. Is there a similar capability in OS X that would ...
1
vote
1answer
158 views

Unable to create a working .app executable using Platypus

I'm new to OS X and I'm trying to create an application wrapper for a shell script that starts a media server(Red5) I'm trying to wrap the Red5 server starter script (red5.sh) into an .app executable ...
0
votes
1answer
50 views

install libsoup on macbook pro

I have a shell script from a open source project, when I run it in terminal, I get the following error: ./configure: line 17678: syntax error near unexpected token `soup,' ./configure: line 17678: ` ...
0
votes
1answer
492 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
110 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
903 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
96 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
716 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
1k 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
241 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
202 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
181 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
0answers
17 views

Yet Another Dialog for OSX [duplicate]

I have made a bash script on my Linux machine. In that script I use the command YAD (Yet Another Dialog) to display things or ask for input. I would like to use that script on my MAC and my question ...
0
votes
1answer
78 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
192 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
94 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 ...
6
votes
2answers
5k 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
748 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
340 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
3k 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
571 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
243 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
170 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
185 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
113 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
263 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 ...
1
vote
2answers
654 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
475 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
119 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
398 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
186 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
335 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
1k 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
187 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
411 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
123 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?
2
votes
1answer
235 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 ...