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
11 views

How to mount and name a volume if it's not already mounted with a startup script

I'm trying to do something I thought would be simple, but after researching it I feel like I'm half way towards shaving a yak, so I'm asking for advice. I want to create a script that lets me and my ...
2
votes
2answers
19 views

Is there a way to preserve terminal tab history across computer restarts?

I'm using Mac 10.9.5. When I run a terminal with multiple tabs (using bash shell), I've noticed that when my computer restarts, the terminal will open up with the same number of tabs that were open ...
1
vote
1answer
39 views

How can I echo shell script in Automator?

I have an Automator service which runs a shell script (ffmpeg command). I'm looking for a way to see the output of the terminal while ffmpeg does it's thing. Adding echo to the ffmpeg command doesn't ...
0
votes
0answers
14 views

Script - Audio Files - Find, Count and Sort by type

I have a very large audio collection I have to sort. It's a mixture of M4A, FLAC, AIFF, WAV and MP3. It's the result of years of work by a now deceased person who sat in their garage ripping their own ...
0
votes
1answer
21 views

Get terminal application name from shell

I am used to my osascript aliases. In particular, I have nx for opening new tab and closing the old one. However, my scripts use application name to send keyboard signals to it. Instead of writing it ...
0
votes
1answer
58 views

Update bash to version 4.0 on OSX

Is it possible to actually update bash to version 4.0 in OSX Yosemite? echo $BASH_VERSION 3.2.57(1)-release This article and this thread refer to the same question, but they install a new shell ...
0
votes
1answer
25 views

Paste tool for OSX

There is paste tool in Linux but have not found for OSX. Its name was probably dpaste or something in Linux. Assume you run xxd -ps r328.raw | head -n2430 and you want to paste it to your friend. ...
0
votes
0answers
11 views

How to open application through notification in terminal shell

I have the following command to run in a terminal shell script: osascript -e 'display notification "This is a Text" with title "This is a Title"' This is a shell code running in applescript to open ...
0
votes
2answers
48 views

Is there a way or a tweak to make Siri execute shell commands

Indeed I have a home automation system, I would like to integrate a voice control system and for that I need to be able to call shell commands like curl. I have seen many Siri tweaks but none of ...
3
votes
3answers
327 views

Downscale a iMac 5K screenshot to 50% using commandline

Open the Screenshot in Preview Select “Adjust Size…” from the Tools menu Change the Width and Height to 50 percent of the original Change the Resolution to 72 pixels/inch I wish to do this on CLI ...
1
vote
0answers
46 views

Changing color of text in terminal for program output

This might be answered already but I could not figure out a good way to phrase it to look for an answer so I hope you'll bear with me. I want to change the color of the text output on Terminal if it ...
2
votes
1answer
18 views

Terminal backslash input repeated in output

I'm using zsh on a MacBook Pro, OS X 10.10. When I type in certain commands, such as this one: cat myfile | awk -F $'\t' '{print $8, $9}' | sort | uniq -c | sort -k1,1n | awk '{if ($1 > 50) sum += ...
0
votes
0answers
44 views

How do I change the dock and ⌘-tab icons for Spyder (basically a Python script) on a Mac?

I have a little bash script that runs Spyder, a Python IDE, courtesy of this question. The purpose of the bash script is to be accessible via Quicksilver and the Finder. The same answer also tells me ...
-2
votes
2answers
41 views

How do I make this terminal script work properly?

I want it to appear like I'm contacting a bunch of ip-adresses and it works fine until the third line in the code and I want to be able to fix it. Also the 4 bottom lines don't work. So this is ...
0
votes
1answer
47 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
25 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
98 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
27 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
67 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
74 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 ...
2
votes
2answers
53 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
89 views

How to paste Chinese/Unicode characters to Terminal?

I'm trying to paste these Chinese letters: 你好世界 to my Terminal, but instead I've got "^L" or some other weird characters. The same happens for other unicode characters (such as £āēīōūśṣṭēīōū) when ...
1
vote
2answers
390 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
55 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
58 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
53 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
21 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
22 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
228 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
783 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
221 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
118 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
27 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
139 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
2answers
660 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
138 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
45 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
174 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?
2
votes
0answers
113 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
239 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
45 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
129 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 ...
1
vote
1answer
350 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
2k 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
603 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
71 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
493 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
244 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
294 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
16 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 ...