NAIR PICO Mac OS

Mac OS X Command Line 101
by Richard Burton

Pico: An Easy To Use Command Line Editor
Part XVI of this series..
November 1st, 2002Grand wild login.

For every problem, there is an explanation that is simple, neat, and wrong.
-
H.L. Mencken, Prejudices

This series is designed to help you learn more about the Mac OS X command line. If you have any questions about what you read here, check out the earlier columns, write back in the comments below, or join us in the Hardcore X! forum.

If you read this column regularly, you have my sympathy. But seriously, folks, you may remember the mild hoo-ha that resulted when I actually dared to *gasp* write about the vi editor. Like most holy wars, that involving your Unix editor choice often comes down to personal tastes and prejudices. Therefore, I tried to chose a middle path between something pretty complex (emacs) and something pretty simple (pico). Naturally it satisfied no one. Let this be a lesson, kids; by staying in the middle of the road, you're more likely to get hit by traffic.

However, as sometimes happens with shouts from the peanut gallery, someone yells out a good point. In this case, it may be that vi can be daunting for the inexperienced. And as I've said before, no one needs more daunts. Therefore, today's column is about a much simpler (though less powerful) editor, pico.

pico comes with Jaguar, so you don't need to download and install it. Just to be sure, check: How much memory is on a macbook air.

First, a little background. pico was originally developed to be the editor of choice for pine, a simple, easy-to-use command-line mail program written at the University of Washington. (In Unix' grand tradition of nested and self-referential acronyms, pine allegedly stands for 'pine is not elm', elm being another command-line mail tool.)

pine was to be used by people who aren't comfortable with a Unix command line: secretaries, data entry clerks, students, and moving down the evolutionary scale, tenured professors and university administrators. As such, pine had to be plain, simple, and straightforward. Likewise, the editor had to be just as plain, simple, and straightforward as pine. This is no small task, but the people at U-dub are to be commended for the results. pine is about the best command-line mail utility I've stumbled across, and the editor, pico, can be grasped easily by secretaries and data entry clerks. Even Perl programmers like yours truly can use it. (Alas, bureaucrats have trouble with it, and the students are rather hit and miss. Well, let's face it, some things just aren't possible.)

Oh, and don't bother looking for pine with the which command; it doesn't come with Jaguar.

Invoking pico is straightforward. Just type:

So, if you've been following this column for a while, and still have the old file testfile in your home directory, type:

at the command line prompt. This should give you something along the lines of :

So, what have we here? Remember, pico is designed for ease of use. If you want to add text, just start typing. There is no 'command mode' and 'insert mode' as in vi. Likewise, you can move around using the four arrow keys.

All of the pico editing commands are control-characters, and some of the most commonly used are listed along the bottom of the terminal window. For those new to these sorts of things, this just means that you hold down the control key (on the lower left or lower right of your keyboard) while you hit the key. Since there is no printable 'control' character as such, it is represented by a carat, ^, followed by the letter. See the '^G Get Help' in the lower left of the screen? The '^G' denotes a control-G. Hold down the control key and hit a 'G' (lower or upper case, it doesn't matter). This should take you to the help screen, thus:

If you do a ^V to move down a page, you should see the start of a complete list of pico commands. One of the first things that will strike you is that pico has a lot fewer commands than vi. This makes pico easier to learn, though less powerful. (Everything comes at a price, you know.) The commands I've found most useful are:
  • The arrow keys, obviously.
  • ^G: Get Help. Because I don't use pico all the time, I don't have all the commands at the tip of my brain (so-called).
  • ^E: End of line. This moves the cursor to the end of the line. It saves a lot of arrowing around.
  • ^A: Star of line. This moves the cursor to the start of the line. Ditto on the arrowing.
  • ^V: Advance the cursor one page.
  • ^Y: Move the cursor back one page.
  • ^L: Refresh the screen. This is useful if the system throws warning messages to your terminal screen.
  • ^W: 'Where is'. Search forward for text.
  • ^K: Cut text. This removes the current line. If you used the ^^ (control-^) command to select text, then the selected text is removed.
  • ^J: Justify text.
  • ^U: Uncut (aka paste) the cut text. However, immediately after a Justify, it will unjustify instead. (More on this below.)
  • ^R: Insert the contents of an external file at the current cursor position.
  • ^O: Output file. Save the file without exiting pico.
  • ^X: Exit. (You are asked if you want to save or not at this point.)
Most of these are straightforward. It should go without saying that the ^W command searches for plain, case-insensitive text, not for a regular expression; that's why I'm saying it. Again, it's simpler but not as powerful. Using ^J to justify text might take a bit of explanation. Recall the line:In vi, the whole line was printed to the terminal but 'wrapped' around the end of the window. pico shows one line of text, however long, per line in the terminal window. The dollar sign ($) at the end is pico's way to tell you that the line is longer than the width of your window. If you want to see the whole thing you can just use the arrow keys or the ^W command to move along it. If you want to split it into a series of lines, and why wouldn't you, just tell pico to justify the text. Use the arrow keys to move the cursor to the line in question, then hit ^J and .. tada!^J can also be used to piece together fragments of consecutive lines into justified text, which is nice for reformatting a paragraph which you've either added to or taken from.

Also, notice that a message has appeared just above the list of commands on the bottom two lines.

pico will generally print any such messages on this line. Notice that the ^U command is now 'Unjustify', not 'UnCut Text'. This is one place where pico is inconsistent in commands. Upon issuing this Unjustify command, we get:If you are really bored, you can do this all day. You have to be quick about it, though. After justifying the text, if you move your cursor off of the paragraph, ^U returns to 'UnCut Text'.

So there we have it, a simple, straightforward, easy-to-use command-line editor. In fact, almost the experienced geeks among you may have noticed that many things are in place for writing our own shell scripts. We're not there yet, though; in our next column, we'll look at editing your commands on the command line, using some of the tools we've seen so far.

You are encouraged to send Richard your comments, or to post them below.

Most Recent Mac OS X Command Line 101 Columns

Command Line History & Editing Your Commands
November 22nd

Pico: An Easy To Use Command Line Editor
November 1st

Understanding The 'grep' Command In Mac OS X
October 4th
https://kjwqy-deposit-synergy-games-pogo-slot.peatix.com.

Supremeplayer 6 0 1 – media player. Command Line History & Editing Your Commands
September 6th

Mac OS X Command Line 101 Archives

Back to The Mac Observer For More Mac News!

Richard Burton is a longtime Unix programmer and a handsome brute. He spends his spare time yelling at the television during Colts and Pacers games, writing politically incorrect short stories, and trying to shoot the neighbor's cat (not really) nesting in his garage. He can be seen running roughshod over the TMO forums under the alias tbone1.

NAIR PICO Mac OS
  • Mac OS X: Mac OS X comes with SSH software called Terminal. Open the Applications folder, then the Utilities folder to find it. Open Terminal and type this command: ssh login.itd.umich.edu. Log in with your uniqname and UMICH password. At the% prompt, type pico and press ENTER, or RETURN. Pico opens a buffer (temporary storage for any text you.
  • Title Developer/publisher Release date Genre License Mac OS versions A-10 Attack! Parsoft Interactive 1995 Flight simulator Abandonware 7.5–9.2.2.
  • Raspberry Pi OS (previously called Raspbian) is our official operating system for all models of the Raspberry Pi. Use Raspberry Pi Imager for an easy way to install Raspberry Pi OS and other operating systems to an SD card ready to use with your Raspberry Pi. Raspberry Pi Imager for Windows; Raspberry Pi Imager for macOS; Raspberry Pi Imager for Ubuntu.
Nair pico mac os catalina

Nair Pico Mac Os Download

In Mac OS X 10.5+ you will find the system daemon launchd for this service. This daemon offers a standardized interface to any user and all programs started automatically by the system.