Tag: OS X shell programming
When an app is installed via MacPorts, or one of the other programs used to bring Linux apps to the Mac, it is stored as a program requiring a terminal program to run. This is fine for some programs such as 7zip but not for others such as pan (a GUI newsreader) and gftp (a GUI based ftp program). I use these programs enough so I’d want them on the dock. After hunting around I found some discussion in a…
As is one can tell from the dates on my posts, I spent a while tracking this one down. The original link is in a now inaccessible e-mail account so I went out and located it directly on the web. The date of the manual is in 2010 so it looks as though it is being kept relatively up to date. For those interested in why I am posting this particular link, the reason is simple. BASH is the shell…
Almost any series of commands which can be run in the shell can be run from a shell script. Tying in some of the last few posts I published here this is an example. Let’s say I wanted to run the gedit editor from the shell rather than from the dock/GUI… I would first have to locate the executable program. I happen to know it is installed in “/Applications/gedit.app/Contents/MacOS/gedit“. By running this program the gedit editor will start. Since it…
This is largely a repeat of an article in an earlier issue of the magazine. It works across all forms of *NIX (including OS X) and in a limited way Windows as well. Most professional *NIX people don’t recommend it. The reasons escape me at the moment. One thought some network analysts had a couple of years ago as to the slow loading of web pages was due to mis-configured or slow ad servers. Visiting some pages with numerous popups…
These tips can be used with the OS X terminal, iTerm, and most Linux shells. I have also verified the history works with the Windows “DOS Prompt”. It’s nice when things work out in a consistent cross-platform way. 😉 The history feature is useful when a programmer wishes to perform similar commands over again. In the past the process used to be more complex. Now it’s as simple as using the up arrow key. The down arrow key works to…
The Mac has a unique way of setting up its $PATH variable. These are the locations the BSD portion of OS X looks at to find programs to run. In this case the list of paths can be found in the file /etc/paths. To edit it the administrator needs to sudo their favourite editor since the file itself is owned by root. For example “sudo pico /etc/paths”. This is useful for the programmer who wants to have their programs accessible…
Programmers are always looking for tools to make things easier. The Terminal program included with OS X is adequate. This alternative makes things a little less spartan. According to the documentation this is an active project where the author implements features from other shells. One thing I find useful is the use of the scrollwheel as the middle mouse button for copy and pasting selected text. It also uses PC (Linux) keybindings such as <Home> (beginning of the line) and…













