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

1
vote
1answer
14 views

How do I create a shortcut to IPython's interactive shell on the dock?

I have successfully installed IPython. I can open the interactive shell by typing this from the Terminal: ipython qtconsole & Is there a way to create a shortcut on the dock that executes the ...
2
votes
1answer
47 views

Trim filenames in automator w. shell or applescript

Why doesn't this work? (The automator is in swedish but the parts are: get selected finder objects - get folder contents - run shell script) I want to trim the first three characters of the ...
1
vote
1answer
50 views

Script to check Software Version

Hi i'm tryin to write a script to check software version. I want to pass my own variables, which are name of the Application and Version. Here's a copy. It's not working for me currently... i'm a ...
1
vote
1answer
42 views

skill -KILL -u $user Command on Max OS X?

Is there an alternative for the skill -KILL -u $user command on the Mac OSx. The basic requirement is I want to log out my current logged in user at end of shell script This program logs out Linux ...
0
votes
1answer
25 views

How can I stop the shell command `mate` from opening Textmate 1.x instead of Textmate2?

I've installed mate in the preferences pane in TextMate2. It says "Shell support installed." I added the string export EDITOR="/usr/local/bin/mate -w" to ~/.bashrc as instructed. However, when I use ...
1
vote
2answers
542 views

What is the Mac equivalent of Windows “start” command?

I'm creating a script that runs several other scripts. I need them to all start up in their own process (read window) so I can review the output of each, but I also need them to run in parallel, so ...
2
votes
1answer
38 views

Modifying .plist with shell changes .plist order

I wrote a simple shell command and saved it as .command. The shell command is simply: defaults write /Users/Milo/Desktop/MyPlist "My Key" "My Entry". The issue that I'm having is that after running ...
1
vote
1answer
62 views

command not found for shell script

I created the following bash script in OS X 10.7.5: $ cd ~/Documents/github/scripts $ vim hello_world.sh #!/bin/bash clear echo "The script starts now." echo "Hi, $USER!" echo "I will now fetch ...
0
votes
2answers
119 views

Why Does a Shell Script Trapping SIGTERM Work When Run Manually, But Not When Run via launchd?

Okay, quite simply I have a shell script that needs to wait for something to happen, but it has a lock-file and some child-processes that I need to ensure are tidied up if the script is interrupted. ...
1
vote
1answer
50 views

How to open shell scripts in editor when double clicking on them

I'm trying to migrate to OS X. One thing what I find really strange / dangerous that by double clicking on shell scripts, I launch them in Terminal. I would like to change this behaviour to open them ...
0
votes
1answer
126 views

Automator: Change to selected directory and run shell script

I'm trying to create a context menu command via Automator service. The context menu command will run a shell script to create some default documents in the given directory. I wrote out the shell ...
0
votes
1answer
28 views

How to script a logout while screen is locked?

I want to log out a user via a shell script, after a delay. However, there's a few other issues: User does not have admin and/or root. Logout must complete even if screen is locked. Currently, I'm ...
2
votes
4answers
399 views

Writing a shell script (or something similar) that will execute some commands

For my work I use an app called Sublime Text to edit website documents. To open my project in sublime text I drag the folder above the icon and it opens it up in sublime text. My next step is to run ...
0
votes
1answer
18 views

Deleteing Original File After Creating Another

Here is the Script I have so far: #! /bin/bash dd=$(date -v -1d '+%Y-%m-%d') for file in *.csv ; do saveName="${dd} - TF.csv" cut -d',' -f5,8 "$file" > "$saveName" done The file ...
3
votes
2answers
64 views

How to have locatedb created / updated automatically?

I ran locate blob.txt and I got: $ locate .bashrc WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command: sudo launchctl load -w ...
2
votes
0answers
37 views

Why is Terminal.app corrupting my tcsh history?

I've had an ongoing problem that appears to be specific to OS X and Terminal.app: periodically, I get garbage in my tcsh history that looks like this: ^[[1m^[[4mcomputername:~/Code/emacs-source ( ...
8
votes
2answers
2k views

Why Mac OS X don't source ~/.bashrc [duplicate]

I found a lot of people figuring out why instruction similar to this : Put X to your ~/.bashrc and you can do Y don't work. It always turns out that Mac OS X's bash's startup files (or Mac's ...
0
votes
0answers
25 views

How to get rid of remnant samba shares via the shell

I'm running 10.6.8, and under System Preferences > Sharing > File Sharing is checked, and I have no folders under the left side. Naturally the right-side isn't populated with any users. When I ...
0
votes
1answer
30 views

Where to Install Applications when using Terminal? [duplicate]

I use the command line a lot to download and install applications. I've always downloaded into the /tmp directory then installed to another directory. But where is the place to install such ...
2
votes
3answers
91 views

Behavior of login shell vs. Linux, 'sh -c'

I have a seemingly-valid command that works fine on Linux boxes but fails on OSX, and I would like to know why. sudo su - validusername sh -c 'whoami' On Linux, this will echo 'validusername' on ...
2
votes
2answers
268 views

How do I change shells (bash to ksh) on OS 10.9.1?

I need to brush up on ksh after an 8 year hiatus. How can I run korn shell in my OS 10.9.1 terminal then switch back to bash when done with tutorials.
1
vote
1answer
42 views

How to find out which terminal app (iTerm or Terminal) is running from within bash

I need to have different color schemes for each of the two terminal types I use. I can set it in the .bash_profile as mentioned here. But how can I tell it to differ depending whether its a iTerm2 or ...
-1
votes
1answer
28 views

Seeking shell-scripting resources for the visual learner

I'm trying to teach myself shell scripting. I understand things best when I see them in the context of a system, especially when I can visualize that system. I'm looking for a visual companion to ...
1
vote
0answers
38 views

Correct Way to Check if Spotlight Has Indexed a Folder's Contents

Okay, so I've written a script that uses mdfind to more quickly match files, however, I need to find the best way to check whether a target directory is indexed or not, so I can fall back to using ...
0
votes
0answers
25 views

Best Way to Add Metadata to a File

Okay, so I have a fairly simple script that uses mdfind to quickly find files matching certain criteria so that I can run some operations on them. However, I don't want to run these operations again ...
2
votes
1answer
380 views

How to remap tmux split pane keys?

On my linux machines, for my terminal shell I have tmux keys mapped to allow me to split windows and then switch between new panes. With or without these mappings I can't figure out how to remap the ...
0
votes
2answers
337 views

Set the master password from terminal

I am trying to set a master password from the terminal (using a shell script). I see the passwd function and the master.passwd function, however I don't see any documentation on either of these to set ...
3
votes
1answer
90 views

Apps using significant energy terminal/applescript

Does anyone know how to access the "Energy Impact" data used to determine "Apps Using Significant Energy" displayed in the battery menu bar? I'd like to use it in a shell-script/applescript.
0
votes
1answer
70 views

How can I launch .sh scripts from the finder in iTerm2 instead of Terminal?

I have set 'always open with' to : 'Iterm2', for .sh files in osX. Although a double click on a shell script now opens a new Iterm window, the script does not actually run, I just the get the empty ...
3
votes
1answer
106 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 ...
1
vote
2answers
113 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
387 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
214 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
148 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
217 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
195 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
101 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
11 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
168 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
101 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
88 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
32 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
316 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
92 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
872 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
67 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
644 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
654 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
173 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
140 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 ...