Tagged Questions

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

2
votes
0answers
21 views

Fish shell installation using homebrew - iconv libiconv error

I am trying to install Fish shell using homebrew using command: brew install fish But the installation fails with the following error: ==> ./configure --prefix=/usr/local/Cellar/fish/2.1.1 ...
0
votes
0answers
16 views

Damaged preference file in /bin/sh

Today in Drive Genius 3, I ran the “Verify Preferences” function in Repair. It yielded this strange result: /bin/sh: xargs: command not found The only option Drive Genius gives is to remove the ...
0
votes
1answer
32 views

How can Apple Script open a shell script with options in a Terminal window?

I’m trying to use Apple Script to execute a shell script file in a new Terminal window, while sending it options. How do I do that? It seems as if Terminal only interprets the path to the script, and ...
0
votes
1answer
39 views

Can I script my mac to reboot and login at a specified time?

Can I use shell scripts, AppleScript, or some other form of scripting to get my mac to reboot and login at a specified time? If so, how?
1
vote
2answers
76 views

How to open a shell script in a new Terminal window and run it with administrator privileges

I need to programmatically open a shell script in a Terminal window and run it with administrator privileges. I'm using osascript as it displays a convenient prompt for an admin login/password. I'm ...
1
vote
3answers
62 views

Running a .sh file but after new PATH is not visible in shell

I am running a file ./setWLSEnv.sh which has the following output: http://pastebin.com/sSXRZd1s ...
1
vote
0answers
19 views

Running “irb” changes my zsh to bash on iTerm2

I'm running OSX 10.9.4, and my default shell is set to z shell. I was just working out my installation of Ruby and RVM and playing around with irb when I suddenly notice that my window title says ...
0
votes
1answer
53 views

How to validate kexts signatures from the command line?

I'd like my shell script to verify if the /System/Library/Extensions folder (and subfolders) contains any kexts that don't pass signature validation. How do I do that? There are a couple utilities ...
0
votes
2answers
29 views

How to run an automator app which launches an X11 app via shell script multiple times

So I have an Applescript to launch xemacs, but I thought it would be nice to have something I could drop files onto (and have an app to choose from contextual menus in the "open with" submenu), so I ...
0
votes
1answer
46 views

Terminal: command overridden via shell script in /usr/local/bin not executed unless called directly

I've created a shell script wrapping ssh to change my terminal background when connecting to a server following one of the many examples on this site and stackexchange. 11:22 ~ $ echo $PATH ...
0
votes
0answers
13 views

# always in front

We all know that via system manager we could add programs they should start visible or not visible with the boot/reboot and that after a power-off the device should restart etc ... What is the most ...
0
votes
1answer
77 views

/bin/sh don't read .profile after update to mac os x 10.10

I have updated my mac os x to 10.10 and got a lot of problems with program compilations. It looks like that default /bin/sh are not reading .profile anymore. So, all scripts, which are dependent from ...
1
vote
0answers
32 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
32 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
32 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
32 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
38 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
24 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
87 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
82 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
89 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
19 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
37 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
93 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
172 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
184 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
46 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
157 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
36 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
168 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
178 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
64 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
43 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
250 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
30 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
33 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
25 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
44 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
40 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
44 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
95 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
549 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
243 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
26 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
80 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
35 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
33 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
95 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
372 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 ...