Os X Introduction

broken image


  1. Os X Introduction Background
  2. Os X Introduction Pdf

Shell scripts are a fundamental part of the OS X programming environment. As a ubiquitous feature of UNIX and UNIX-like operating systems, they represent a way of writing certain types of command-line tools in a way that works on a fairly broad spectrum of computing platforms.

Os X Introduction

Because shell scripts are written in an interpreted language whose power comes from executing external programs to perform processing tasks, their performance can be somewhat limited. However, because they can execute without any additional effort on nearly any modern operating system, they represent a powerful tool for bootstrapping other technologies. For example, the autoconf tool, used for configuring software prior to compilation, is a series of shell scripts.

Mac OS X Introduction Mac OS X — The Basics. Mac OS X is the operating system of your Mac. It's the basic system that enables your Mac to work. Mac OS X — An Overview. The home of your Mac is the desktop. Think of it as a physical desktop – a place where you may. In the bottom of your. The 'X' in Mac OS X and OS X is the Roman numeral for the number 10 and is pronounced as such. The core of macOS is an open source OS called Darwin, but Darwin itself cannot run macOS software. MacOS releases are named after kinds of big cats, or California landmarks, and have a version number that starts with 10. Mac OS X is the first real replacement for the older Mac OS, based on the OPENSTEP Unix operating system from NeXT. In addition to the original OPENSTEP libraries, OS X adds the Carbon libraries to allow older programming paradigms from the System 7.x core to be run under OS X and gain many of the benefits of this modern OS core.

You should read this document if you are interested in learning the basics of shell scripting. This document assumes that you already have some basic understanding of at least one procedural programming language such as C. It does not assume that you have very much knowledge of commands executed from the terminal, though, and thus should be readable even if you have never run the Terminal application before.

The techniques in this document are not specific to OS X, although this document does note various quirks of certain command-line utilities in various operating systems. Install adobe reader 8 1 2. In particular, it includes information about some cases where the OS X versions of command-line utilities behave differently than other commonly available versions such as the GNU equivalents commonly used in Linux and some BSD systems.

This document is not intended to be a complete reference for shell scripting, as such a subject could fill entire libraries. However, it is intended to provide enough information to get you started writing and comprehending shell scripts. Along the way, it provides links to documentation for various additional tools that you may find useful when writing shell scripts.

For your convenience, many of the scripts in this document are also included in the 'Companion File' Zip archive. You can find this archive in the heading area when viewing this document in HTML form on the developer.apple.com website.

Organization of This Document

This document is organized as a series of topics. These topics can be read linearly as a tutorial, but are also organized with the intent to be a quick reference on key subjects.

  • Before You Begin—explains how to get a command prompt in OS X and other operating systems, provides pointers to documentation about using the command line interactively, and provides useful command-line tips (such as how to enter control characters).

  • Shell Script Basics—introduces basic concepts of shell scripting, including variables, control statements, file I/O, pipes, redirection, and argument handling.

  • Subroutines, Scoping, and Sourcing—describes how to obtain result codes from outside executables, how to write and call subroutines, subroutine variable scoping rules, how to include one shell script inside another (sourcing), and how to use job control to run tasks in the background.

  • Paint by Numbers—explains how to use integer math in shell scripts. This section also explains how to use the bc command-line utility or Perl to handle more complex math, such as floating-point calculations.

  • Regular Expressions Unfettered—describes basic and extended regular expressions and how to use them. This section also describes the differences between these regular expression dialects and the dialect supported by Perl, and shows how to use Perl regular expressions through inline scripting.

  • How AWK-ward—explains the AWK command, which provides a data-driven programming language based on regular expressions and tabular data.

  • Designing Scripts for Cross-Platform Deployment—describes key differences in the shell scripting environments provided by various operating systems and provides tips for writing portable scripts.

  • Advanced Techniques—shows you how to simulate data structures and pointers, perform nonblocking I/O, write timing loops, trap signals, use special built-in shell variables, draw styled text using ANSI color and formatting commands, find the absolute path of a script, use osascript to manipulate graphical applications, and use file descriptors and named pipes to treat command-line tools as filters.

  • Performance Tuning—describes techniques for improving the performance of complex scripts.

  • Other Tools and Information—provides a basic summary of various commands that may be useful to shell script developers, including links to OS X documentation for each of them.

  • Starting Points—provides several sample shell scripts and snippets that automate real-world tasks. This appendix also provides links to other complete examples elsewhere in the book.

  • An Extreme Example: The Monte Carlo (Bourne) Method for Pi—provides a complex example to showcase the power of shell scripts to perform complex tasks (slowly). The code example shows a shell script implementation of the Monte Carlo method for approximating the value of Pi. The code example takes advantage of a number of numerical and string handling techniques described in the previous chapters. By showing some of the same calculations written in multiple ways, it also illustrates why it is often beneficial, performance-wise, to embed scripts written in other languages such as Perl or AWK when attempting tasks that suit those languages better.

Happy scripting!



Copyright © 2003, 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10

If you want to wake your Mac up, just move and click the mouse – or press a key on the keyboard.

Os X Introduction Background

However, when you make your Mac simply sleep, anyone who has access to the computer can wake up your Mac. For that reason, you can also log out of your user name. Your Mac will still go to sleep on its own, but when you wake it up you will have to log in using your Apple ID.

To logout, go to >Logout.

You will then see a confirmation box that looks like this:


If you leave the checkmark beside 'Reopen windows when logging back in,' every program you have running and every window you have open will open again when you log back into your Mac. Uncheck the box if you do not want this to happen, then click the Log Out button.

If you want to shut down your Mac instead, which means turning it off completely, go to >Shutdown.


Decide if you want all programs and windows to reopen when you turn your Mac back on, then click the Shut Down button.

Click the Shut Down button to shut down your Mac.

If you want to restart your Mac, go to Apple >Restart.


Once again, decide if you want all programs and windows to reopen after your Mac restarts, then click the Restart button.

Finding Help in OS X Yosemite

Apple doesn't offer many resources to answer your questions and solve your problems. In fact, the only help you will find is in the Help menu at the top of your desktop screen.

Interested in learning more? Why not take an online class in OS X Yosemite?


From here, you have a few options to find the topic for which you need help.

You can type the topic in the search bar.

When you do, you will see the results appear below the search bar.


You can click on any of the results to be taken to the Help browser.


Os X Introduction Pdf

In addition, you can also to go Help>Mac Help.

This too opens the Help browser.

Introduction

Because shell scripts are written in an interpreted language whose power comes from executing external programs to perform processing tasks, their performance can be somewhat limited. However, because they can execute without any additional effort on nearly any modern operating system, they represent a powerful tool for bootstrapping other technologies. For example, the autoconf tool, used for configuring software prior to compilation, is a series of shell scripts.

Mac OS X Introduction Mac OS X — The Basics. Mac OS X is the operating system of your Mac. It's the basic system that enables your Mac to work. Mac OS X — An Overview. The home of your Mac is the desktop. Think of it as a physical desktop – a place where you may. In the bottom of your. The 'X' in Mac OS X and OS X is the Roman numeral for the number 10 and is pronounced as such. The core of macOS is an open source OS called Darwin, but Darwin itself cannot run macOS software. MacOS releases are named after kinds of big cats, or California landmarks, and have a version number that starts with 10. Mac OS X is the first real replacement for the older Mac OS, based on the OPENSTEP Unix operating system from NeXT. In addition to the original OPENSTEP libraries, OS X adds the Carbon libraries to allow older programming paradigms from the System 7.x core to be run under OS X and gain many of the benefits of this modern OS core.

You should read this document if you are interested in learning the basics of shell scripting. This document assumes that you already have some basic understanding of at least one procedural programming language such as C. It does not assume that you have very much knowledge of commands executed from the terminal, though, and thus should be readable even if you have never run the Terminal application before.

The techniques in this document are not specific to OS X, although this document does note various quirks of certain command-line utilities in various operating systems. Install adobe reader 8 1 2. In particular, it includes information about some cases where the OS X versions of command-line utilities behave differently than other commonly available versions such as the GNU equivalents commonly used in Linux and some BSD systems.

This document is not intended to be a complete reference for shell scripting, as such a subject could fill entire libraries. However, it is intended to provide enough information to get you started writing and comprehending shell scripts. Along the way, it provides links to documentation for various additional tools that you may find useful when writing shell scripts.

For your convenience, many of the scripts in this document are also included in the 'Companion File' Zip archive. You can find this archive in the heading area when viewing this document in HTML form on the developer.apple.com website.

Organization of This Document

This document is organized as a series of topics. These topics can be read linearly as a tutorial, but are also organized with the intent to be a quick reference on key subjects.

  • Before You Begin—explains how to get a command prompt in OS X and other operating systems, provides pointers to documentation about using the command line interactively, and provides useful command-line tips (such as how to enter control characters).

  • Shell Script Basics—introduces basic concepts of shell scripting, including variables, control statements, file I/O, pipes, redirection, and argument handling.

  • Subroutines, Scoping, and Sourcing—describes how to obtain result codes from outside executables, how to write and call subroutines, subroutine variable scoping rules, how to include one shell script inside another (sourcing), and how to use job control to run tasks in the background.

  • Paint by Numbers—explains how to use integer math in shell scripts. This section also explains how to use the bc command-line utility or Perl to handle more complex math, such as floating-point calculations.

  • Regular Expressions Unfettered—describes basic and extended regular expressions and how to use them. This section also describes the differences between these regular expression dialects and the dialect supported by Perl, and shows how to use Perl regular expressions through inline scripting.

  • How AWK-ward—explains the AWK command, which provides a data-driven programming language based on regular expressions and tabular data.

  • Designing Scripts for Cross-Platform Deployment—describes key differences in the shell scripting environments provided by various operating systems and provides tips for writing portable scripts.

  • Advanced Techniques—shows you how to simulate data structures and pointers, perform nonblocking I/O, write timing loops, trap signals, use special built-in shell variables, draw styled text using ANSI color and formatting commands, find the absolute path of a script, use osascript to manipulate graphical applications, and use file descriptors and named pipes to treat command-line tools as filters.

  • Performance Tuning—describes techniques for improving the performance of complex scripts.

  • Other Tools and Information—provides a basic summary of various commands that may be useful to shell script developers, including links to OS X documentation for each of them.

  • Starting Points—provides several sample shell scripts and snippets that automate real-world tasks. This appendix also provides links to other complete examples elsewhere in the book.

  • An Extreme Example: The Monte Carlo (Bourne) Method for Pi—provides a complex example to showcase the power of shell scripts to perform complex tasks (slowly). The code example shows a shell script implementation of the Monte Carlo method for approximating the value of Pi. The code example takes advantage of a number of numerical and string handling techniques described in the previous chapters. By showing some of the same calculations written in multiple ways, it also illustrates why it is often beneficial, performance-wise, to embed scripts written in other languages such as Perl or AWK when attempting tasks that suit those languages better.

Happy scripting!



Copyright © 2003, 2014 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2014-03-10

If you want to wake your Mac up, just move and click the mouse – or press a key on the keyboard.

Os X Introduction Background

However, when you make your Mac simply sleep, anyone who has access to the computer can wake up your Mac. For that reason, you can also log out of your user name. Your Mac will still go to sleep on its own, but when you wake it up you will have to log in using your Apple ID.

To logout, go to >Logout.

You will then see a confirmation box that looks like this:


If you leave the checkmark beside 'Reopen windows when logging back in,' every program you have running and every window you have open will open again when you log back into your Mac. Uncheck the box if you do not want this to happen, then click the Log Out button.

If you want to shut down your Mac instead, which means turning it off completely, go to >Shutdown.


Decide if you want all programs and windows to reopen when you turn your Mac back on, then click the Shut Down button.

Click the Shut Down button to shut down your Mac.

If you want to restart your Mac, go to Apple >Restart.


Once again, decide if you want all programs and windows to reopen after your Mac restarts, then click the Restart button.

Finding Help in OS X Yosemite

Apple doesn't offer many resources to answer your questions and solve your problems. In fact, the only help you will find is in the Help menu at the top of your desktop screen.

Interested in learning more? Why not take an online class in OS X Yosemite?


From here, you have a few options to find the topic for which you need help.

You can type the topic in the search bar.

When you do, you will see the results appear below the search bar.


You can click on any of the results to be taken to the Help browser.


Os X Introduction Pdf

In addition, you can also to go Help>Mac Help.

This too opens the Help browser.


You can then choose a topic from the left or type a keyword in the search box at the top right of the browser window.




broken image