diff options
author | Jovina | 2012-02-01 12:59:45 +0530 |
---|---|---|
committer | Jovina | 2012-02-01 12:59:45 +0530 |
commit | c9a6f30490d5600ff21d4729df7f9c17686380e4 (patch) | |
tree | 067abe10a669fe3a51754e40c0370a88abed5235 /ult/ult_6/ult6.tex | |
parent | 87fe66e54a3a48514d166b64c5259b390e6f5709 (diff) | |
download | sdes-stscripts-c9a6f30490d5600ff21d4729df7f9c17686380e4.tar.gz sdes-stscripts-c9a6f30490d5600ff21d4729df7f9c17686380e4.tar.bz2 sdes-stscripts-c9a6f30490d5600ff21d4729df7f9c17686380e4.zip |
Added 8 ult scripts
Diffstat (limited to 'ult/ult_6/ult6.tex')
-rw-r--r-- | ult/ult_6/ult6.tex | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/ult/ult_6/ult6.tex b/ult/ult_6/ult6.tex new file mode 100644 index 0000000..389a602 --- /dev/null +++ b/ult/ult_6/ult6.tex @@ -0,0 +1,176 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Using Linux Tools +% +% Author: FOSSEE +% Copyright (c) 2009, FOSSEE, IIT Bombay +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\documentclass[12pt,compress]{beamer} + +\mode<presentation> +{ + \usetheme{Warsaw} + \useoutertheme{infolines} + \setbeamercovered{transparent} +} + +\usepackage[english]{babel} +\usepackage[latin1]{inputenc} +%\usepackage{times} +\usepackage[T1]{fontenc} + +% Taken from Fernando's slides. +\usepackage{ae,aecompl} +\usepackage{mathpazo,courier,euler} +\usepackage[scaled=.95]{helvet} + +\definecolor{darkgreen}{rgb}{0,0.5,0} + +\usepackage{listings} +\lstset{language=sh, + basicstyle=\ttfamily\bfseries, + commentstyle=\color{red}\itshape, + stringstyle=\color{darkgreen}, + showstringspaces=false, + keywordstyle=\color{blue}\bfseries} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% DOCUMENT STARTS +\begin{document} + +\begin{frame} + +\begin{center} +\vspace{12pt} +\textcolor{blue}{\huge Using Linux Tools\\Part VI} +\end{center} +\vspace{18pt} +\begin{center} +\vspace{10pt} +\includegraphics[scale=0.95]{../images/fossee-logo.png}\\ +\vspace{5pt} +\scriptsize Developed by FOSSEE Team, IIT-Bombay. \\ +\scriptsize Funded by National Mission on Education through ICT\\ +\scriptsize MHRD,Govt. of India\\ +\includegraphics[scale=0.30]{../images/iitb-logo.png}\\ +\end{center} +\end{frame} +\begin{frame} +\frametitle{Objectives} +\label{sec-2} + +At the end of this tutorial, you will be able to, +\begin{itemize} +\item Prepare a simple shell script. +\item Run a script successfully and print it's result. +\item Understand what an environment variable is. +\end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Pre-requisite} +\label{sec-3} + +Spoken tutorial on - +\begin{itemize} +\item Using Linux tools -- Part I +\item Using Linux tools -- Part II +\item Using Linux tools -- Part III +\item Using Linux tools -- Part IV +\item Using Linux tools -- Part V +\end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{\texttt{PATH}} + \begin{itemize} + \item The shell searches in a set of locations, for the command + \item Locations are saved in ``environment'' variable called PATH + \item \texttt{echo} can show the value of variables + \end{itemize} + \begin{lstlisting} + $ echo $PATH + \end{lstlisting} % $ + \begin{itemize} + \item Put \texttt{results.sh} in one of these locations + \item It can then be run without \texttt{./} + \end{itemize} +\end{frame} + +\begin{frame}[fragile] + \frametitle{Variables \& Comments} + \begin{lstlisting} + $ name=FOSSEE + $ count=`wc -l wonderland.txt` + $ echo $count # Shows the value of count + \end{lstlisting} % $ + \begin{itemize} + \item It is possible to create variables in shell scripts + \item Variables can be assigned with the output of commands + \item \alert{NOTE:} There is no space around the \texttt{=} sign + \item All text following the \texttt{\#} is considered a comment + \end{itemize} +\end{frame} + +\begin{frame} +\frametitle{Summary} +\label{sec-8} + + In this tutorial, we have learnt to, + + +\begin{itemize} +\item Prepare a shell script. +\item Display the result of a script, using the ``echo'' command. +\item Use the environment variable ``PATH''. +\item Create variables and comment out content using the ``\#'' sign. +\end{itemize} +\end{frame} + +\begin{frame}[fragile] +\frametitle{Evaluation} +\label{sec-9} + + +\begin{enumerate} +\item Which sign is used to comment out content from a shell script? +\begin{itemize} +\item \$ +\item \% +\item \# +\item * +\end{itemize} +\vspace{8pt} +\item How will you add directory ``/data/myscripts'' to the beginning of + the \$PATH environment variable ? +\end{enumerate} +\end{frame} +\begin{frame} +\frametitle{Solutions} +\label{sec-10} + + +\begin{enumerate} +\item `` \# '' +\vspace{15pt} +\item \$ PATH=/data/myscripts:\$PATH +\end{enumerate} +\end{frame} +\begin{frame} + + \begin{block}{} + \begin{center} + \textcolor{blue}{\Large THANK YOU!} + \end{center} + \end{block} +\begin{block}{} + \begin{center} + For more Information, visit our website\\ + \url{http://fossee.in/} + \end{center} + \end{block} +\end{frame} + +\end{document} + + |