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
0answers
16 views

Why does tcpdump not recognise piped input?

I obtained a packet capture file: $ sudo tcpdump -w file.pcap I can then analyse that file: $ tcpdump -r file.pcap I can even use file redirection to read from standard input: $ tcpdump -r - ...
1
vote
0answers
20 views

Any way to reboot a iDevice that is connected to a USB port via terminal (Mac terminal)?

So, I am making a program to reboot iDevices (if there power buttons are broken), is there any way to induce the iDevice to reboot via the Mac shell? Take you'r time.
0
votes
2answers
25 views

is it possible to open a file with commandline mate without focusing TextMate?

Or if not, is there an easy way to return focus to iTerm/Terminal after opening a file/directory with mate?
0
votes
1answer
28 views

Automator shell Script works, except inside dropbox

I used Automator to create a service that runs pdf2svg from the context menu in Finder. for f in "$@" do /opt/local/bin/pdf2svg $f ${f%.*}".svg" done It works fine, except it does not work on ...
0
votes
1answer
24 views

How can I add shells to the list in Run Shell Script in the Automator?

If I select the Run Shell Script action in Automator, it has a drop down menu filled with possible shells: /bin/bash /bin/csh /bin/ksh /bin/sh /bin/tcsh /bin/zsh /usr/bin/perl ...
0
votes
0answers
14 views

Run kinit as AppleScript promting for network username and password

I need to develop a small app (currently using AppleScript to do it) that I can send to users to run a "kinit" shell script command. This is on machines that are not bound to the domain, but needs to ...
1
vote
2answers
63 views

Apple or BASH script to automatically install multiple apps

I would like to create a script to install a group of programs. The PKG files reside on a Windows file share. I current can install them one at a time through the Terminal using the following syntax: ...
1
vote
1answer
45 views

How to enable/disable Do Not Disturb from shell on Mavericks

I would like to toggle the Do Not Disturb in the notification center with a keyboard shortcut. I am using better touch tool for some extra keyboard shortcuts but it does not support ...
7
votes
1answer
77 views

How to “chroot” a terminal inside a DMG?

I'm doing security research and for that purpose I use an SHA-2 encrypted DMG to store the tools and files I work with (containing confidential client info), to protect them from forensic examination ...
0
votes
0answers
17 views

automator script for typesetting TeX can not run the TeX engine

In the script below instead of echo $filename I want to have xelatex $filename. However, if we do that the automator gives a running error without any description. Before I set the path I was ...
0
votes
2answers
35 views

Calling an app from the terminal via script

I try to call an application from the console and pass it an argument. This is the script I am using: #!/bin/sh open -a "/Applications/MyApp.app/" $1 Somehow the OS is unhappy with this and ...
0
votes
1answer
11 views

ln -fFs does not update symlink

I have two directories newdir and otherdir and would like to update a symlink, that initially pointed to otherdir to newdir. When I run: > ln -s otherdir symlink I see a symlink: > ls -al ...
0
votes
1answer
62 views

Mac OS X Terminal - Basic commands not found by shell [duplicate]

I've had some problems recently with terminal. The shell isn't able to execute basic commands, since they are not being found. Here's an example : -bash: ls: command not found I've been doing some ...
0
votes
1answer
102 views

Applescript Invoke Specific User and Password

I have a do shell script that I need to run in Applescript, but it needs to run as a different user. It is to be deployed into the student's network drive as a standalone application that the students ...
1
vote
2answers
132 views

How can I make an Automator service run a shell script and display the output?

I'm using Automator to run a shell script (ffmpeg transcode to h264) as a 'Service', so that I can just right click the high res .mov file and select the service. It works fine, but as it's ffmpeg it ...
1
vote
1answer
37 views

Find, compare, delete duplicate music files with Terminal

I am trying to clean up my iTunes. I have a lot of duplicate files (* 1.mp3 or * 1.m4a). I want to make sure before I find/clean the duplicates ending in ' 1' that they are truly bit-for-bit ...
1
vote
1answer
81 views

Moving terminal version of python to homebrew version

python -V shows that I am on 2.7.7 but brew upgrade python shows I have 2.7.8 so clearly my terminal isn't looking at the Homebrew version. How do I fix this?
0
votes
1answer
34 views

broke my python easy_install how to fix?

Any idea how to fix: -bash: /usr/bin/easy_install: No such file or directory I kind of deleted it by accident before I realized that being behind a proxy was my issue not easy_install
3
votes
5answers
153 views

Shell script help

I am new to writing shell scripts for Unix and need a little help. I am not sure why cURL now all of the sudden after running the script is downloading corrupts packages which cannot be mounted and ...
1
vote
4answers
138 views

Getting my old Terminal back after uninstalling fish

Recently I got tired of the smaller kinks that the Fish Shell presented me with (undiscoverable commands etc.) so I decided I wanted to change the shell back to normal and uninstall fish. However in ...
1
vote
1answer
59 views

Unknown error message in Terminal

When I open the Terminal I keep getting this message, which I suppose is some error: /Users/sinisasasic/.zshrc:export:48: not valid in this context: ...
2
votes
1answer
41 views

How to remove the device name from the bash prompt? [duplicate]

Is it possible to remove the device name in my shell commands to "save space"? My-MacBook-Pro:~ username$ to ~ username$
1
vote
2answers
139 views

Open an new Safari window on the current space from the Termial shell with multiple tabs (URLs)

How to open an new Safari window from the Termial shell on the current space? Now when using the open http://example.com it got opened the URL as last TAB on my 1st safari window. I'm looking for ...
0
votes
0answers
22 views

Advanced techniques to diagnose performance problems on OS X via DTrace or other means?

I am having some severe performance problem with my OS X workstation at the moment that is proving to be exceptionally elusive. I normally can hunt things down with a handful of tools such as top or ...
0
votes
1answer
30 views

GeekTool messes up formatting for cat

I have a text file called stocks.txt it looks like this: AAPL [1;37m 96.15[00m[32m 0.55 (0.58%)[00m GOOG [1;37m 566.07[00m[31m -5.53 (-0.97%)[00m FB [1;37m 72.28[00m[31m ...
1
vote
1answer
23 views

How can I inspect the environment variables of a running process?

Is there some equivalent (CLI or GUI) to Linux's /proc/$PID/environ feature?
0
votes
1answer
33 views

Creating a script that will execute a program and if it exits without crashing, will run it again

I've already asked this question in the UNIx exchange but I was told to ask here also about AppleScripts if the standard shell does not work. I require a script that will open an application. Wait ...
0
votes
1answer
39 views

How to iterate through multiple file extension without caring about case sensitivity?

I've seen various topics on how to iterate through multiple file extensions, but in most cases the list is defined. example: for file in ${arg}/**/*.{txt,h,py} do .... done As can be seen, ...
1
vote
2answers
40 views

How to run a script from Alfred or Spotlight or any run dialog?

Coming from Linux I am really missing the good old gmrun -- a run dialog which recognizes your $PATH and allows you to execute any script in it without needing to open up a terminal. It does the job ...
1
vote
1answer
83 views

Execute simple script

I wrote the following very simple script: route -n add 192.168.0.0/20 192.168.224.1 route -n delete 0.0.0.0 route -n add 0.0.0.0 172.20.10.1 And would like to just double click it and you ...
1
vote
2answers
417 views

Attempting to run find command gives “Permission denied”

I am attempting to obtain a list of applications on my Mac using find to search for *.app. However, when running the command, I get a lot of Permission denied messages, as below. The computer is mine ...
1
vote
1answer
216 views

How to put a application in fullscreen using shell command in Mavericks?

I would like to ensure a application is running in fullscreen using a shell command (or script). I've seen some approaches that tell the application to execute a keyboard shortcut (cmd+ctrl+f) but ...
1
vote
0answers
20 views

How to prevent TextEdit from commandline to cause Developer Unknown warning?

Is there any way (other than disabling Gatekeeper through preferences) to allow TextEdit to open my shell-script from a command-line? I'm more than ok with a dialog warning me, but the current dialog ...
1
vote
1answer
65 views

dpkg.pm @INC dpkg-scanpackages / > Packages

I am running Max OS X 10.9 Installed: -Xcode 5 (latest version) -Fink -MacPorts -Xcode Command Line Tools -Theos I have a shell script running Dpkg-scanpackages debs / > Packages But i am ...
3
votes
1answer
32 views

how to run alias using bash -c from IDEA

I'm trying to run a program defined in an alias (and the alias is defined in a source file) alias myapp="/somepath/app -arg1 -arg2" Then I go to IDEA and create an External Tool Program: Bash ...
0
votes
0answers
25 views

Terminal: Different Profiles, Different Startup Command

In Terminal preferences you can create different "profiles" under the "Settings" tab. After selecting a profile, clicking the "shell" tab will allow you to set a startup command. However, this is not ...
2
votes
1answer
93 views

Dollar sign in mdfind shell command

I'm a newbie in shell scripting. What's the difference between these two commands? What's the use of the dollar sign? mdfind $'kMDItemFSName="*iValet\'s*"c' mdfind 'kMDItemFSName="*iValet\'s*"c' ...
1
vote
2answers
299 views

Shell variable PROMPT_COMMAND not working as intended?

I want my bash prompt to change depending on external conditions. Here is excerpt from the bash manual: PROMPT_COMMAND: If set, the value is executed as a command prior to issuing each primary ...
1
vote
2answers
234 views

chsh doesn't change $SHELL

I'm having some difficulties in changing the value of $SHELL in OSX's iTerm app. iTerm is starting in /bin/zsh, but the value of $SHELL doesn't seem to change. What I've done: Changed "command" as ...
2
votes
1answer
105 views

Shell scripting: Why does only the “-” hyphen throw an error?

Goal: Cleaning up Selectively truncate filenames in my nvALT notes folder. I tried using a productivity blogger's suggestion (which eludes me after a thorough search) to prepend ^ > - + to ...
1
vote
1answer
21 views

How to change default LC_TYPE?

My OS X (Mavericks) seems to be setting LC_CTYPE environmental variable to UTF-8 by default. How can I change the default? I need LC_CTYPE to be en_US.UTF-8. There's a catch: I don't want to ...
3
votes
3answers
233 views

Shell scripting: Select folder based on part of file name

My project I'm creating a bash shell script to execute from the Terminal. Its purpose is to archive lots and lots of project folders. Each folder follows a prescribed nomenclature: [YYYY.MM.DD] - ...
2
votes
1answer
76 views

Shell script: Move folders + preserve structure

My goal I organize my projects into folders. These folders all live in my Completed projects folder. I am beginning to archive them into an Archived Projects folder, and I want to archive them in ...
1
vote
1answer
266 views

ffmpeg working from command line in Terminal but not in an Automator shell script!

I have just compiled my own copy of ffmpeg on my system and it's located in the following path: /opt/local/bin/ffmpeg When I run the following command in Terminal.app, it runs smooth: ffmpeg -i ...
2
votes
1answer
350 views

How does this complex BASH shell script work?

Apple Support Community member Linc Davis developed this command to aide in diagnosing issues. The output gives a general overview of one's system and is very similar to the program etrecheck. But, it ...
2
votes
4answers
988 views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
1
vote
1answer
73 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
286 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
2answers
147 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
72 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 ...