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
1answer
28 views

bash- command not fount error

I tried to install omnet++ on my Macbook pro (OS 10.10) yesterday. I got an error so I delete path in my bash-profile. Now, every command I try to run in my terminal shows an error of command not ...
0
votes
1answer
18 views

Shell set environment variables for command

I want to run a program in Terminal and set its environment variables. According to my research one can do this using: VARIABLE="value" VARIABLE2="value2" run_program Now I'd like to set a variety ...
1
vote
2answers
84 views

Does iPhone 5 have a terminal?

I'm new to iPhones and Mac, but I pretty ok with Linux. I think I could solve some of my networking issues, if I could just get into a bash shell, but I haven't been able to locate a shell. Is there ...
2
votes
1answer
25 views

Can't get Terminal to Display Colour (Mavericks)

I've recently been working on a script to backup files, etc. for my own use but recently I thought it may look nicer if I was able to cleanup and have everything nice and tidy (with colours and what ...
0
votes
0answers
31 views

Automator Calendar Action to Launch Shell Script in Background

First and foremost: Everything works, automator launches when it is supposed to, the shell script executes, and I get the results I am looking for. Where the problem comes in to play is that the ...
2
votes
1answer
38 views

Open application from terminal and remain linked to the process (like Linux) so when CTRL+C is sent to terminal the application closes too

I have an application (closed-source tool not developed by me) which requires another process to exist before executing properly. When I quit this application, I also want that custom process to be ...
1
vote
0answers
34 views

Python script executable opened by text editor

I have a simple "Hello world" script that I want to turn into an executable. The problem is that even though I went through the steps of declaring the path of the Python interpreter in the first list ...
0
votes
0answers
40 views

How to paste Chinese/Unicode characters to Terminal?

I'm trying to paste some Chinese: 你好世界 to my Terminal, but instead I've got ^L or some other weird characters. The same happens for other unicode characters (such as £āēīōūśṣṭēīōū) when pasting or ...
1
vote
2answers
130 views

Why `echo -n` doesn't work in this script on mac terminal?

I am learning shell from tutorialspoint today:http://www.tutorialspoint.com/unix/unix-shell-loops.htm And I copied this code block to a loop.sh file: #!/bin/sh a=0 while [ "$a" -lt 10 ] # this ...
0
votes
1answer
44 views

osx service for `mpc add`ing files to mpd’s playlist

I’m trying to create a service in automator, which allows me to add files/folders from Finder directly into my mpd playing queue. I tried the following, the command runs, but nothing happens. ...
0
votes
1answer
38 views

Applescript and Shell: how do I insert a variable?

I'm using the following code to set a Philips Hue bulb with specific hue, saturation and brightness using Applescript. It works perfectly. set TurnOnBulbA to the quoted form of "{\"on\": ...
0
votes
2answers
45 views

Using 'kMDItemContentModificationDate' in 'do Shell Script'

I want to find files modified on a specific date. It is not important what time of day they were modified. I tried the following and got an empty list (no error): set theFolder to (choose folder) set ...
1
vote
0answers
20 views

Filling areas of Json script with user prompts

I am wanting and Applescript to fill certain parts of a Json script via user input prompts, but not sure how to place the results in the correct areas? And to then have the result copied to the ...
0
votes
0answers
20 views

alias command stopped working

I have a few aliases set up on my mac. But for some reason they don't seem to work anymore. I'm not sure why either. Even when I type in alias to see my list of aliases nothing happens just this: ...
2
votes
1answer
156 views

Move all contents from a folder to another with shell script

Why does this work? mv /Users/diogosaraiva/Music/Youtube/Novas/* /Users/diogosaraiva/Music/Youtube/Tratadas …but the commands below don't work? mv "/Users/diogosaraiva/Music/Youtube/Novas/*" ...
9
votes
3answers
746 views

Where is a reasonable sed?

On Yosemite. The sed is old: does not understand \t for example. I installed coreutils and can not find any sed associated with same. What are my options here?
0
votes
1answer
140 views

Automator gets stuck at shell script

I am building an automator script to do automatic backups to a network drive via rsync. The shell script works perfectly fine in terminal and completes and everything, but when i run it from ...
0
votes
0answers
83 views

fish shell suggests commands in tmux

I use fish shell, it's has option "suggests commands", so it is works like in the next screenshot. Examle: You type command git status. In the next time when you type just g or git fish give you ...
1
vote
0answers
26 views

Can I get less(1) to display the final line, without selecting it?

When less(1) is looking at a file with a long name, pressing = updates only the final line on screen. For example, with the Terminal window at 80 columns and 27 rows (the default, I think), if I do: ...
0
votes
3answers
99 views

Can I set the primary Language of OS X by using shell script or AppleScript?

My computer is mac mini (late 2012) with Yosemite 10.10.1 installed. The primary language of the system is English, with Chinese being the second language. Sometimes I need to use the Maps.app, and ...
7
votes
0answers
450 views

How to isolate processes that evoke insane mds_stores disk read activity?

I have an interesting situation where when I monitor my disk activity, I find that mds_store is continually running between 1 to 35 megabytes per second (averaging around 3-5 MB/s) on the read and ...
1
vote
4answers
107 views

AppleScript executes itself again after a reboot it initiated. How to avoid that?

I have a shell script that is run by an AppleScript app. That shell script restarts the machine at some point with shutdown -r now. How can I avoid having the AppleScript application automatically ...
2
votes
2answers
36 views

listing files with extension in Terminal [duplicate]

in a Terminal session the command ls *.pdf -l does not list the pdfs (or whatever other file format) as expected, as the -l option seems to be ignored. Everything works fine if I issue a simple ...
2
votes
1answer
112 views

How to change the default command to open shells in the MobileTerminal Cydia package

I am using MobileTerminal on iOS 7, and want to know how to change the default shell from sh: to bash:. I assume I would need to change the login command for this, but how would I?
0
votes
0answers
91 views

How to identify an iOS hotspot from the command line?

Is it possible from the command line to identify whether the current Wi-Fi connection, or a detected SSID, is an iOS personal/instant hotspot? I know OS X can detect this, as it shows a specific ...
2
votes
1answer
186 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
38 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
99 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
213 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
1k 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
495 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
57 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
329 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
168 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
233 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
14 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
235 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
1answer
174 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
1answer
90 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
53 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
40 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 ...
1
vote
1answer
109 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
59 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
418 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: ...
2
votes
1answer
584 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
109 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
28 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
169 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
19 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
1k 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 ...