Posts

Showing posts from 2009

Common Unix - Shell Features

Overview of common shell features.  The following features are standard in every shell. List is as follows - Command     Meaning >     Redirect output >>     Append to file <     Redirect input <<     "Here" document (redirect input) | Pipe     output &     Run process in background. ;     Separate commands on same line *     Match any character(s) in filename ?     Match single character in filename [ ]     Match any characters enclosed ( )     Execute in subshell ` `     Substitute output of enclosed command " "     Partial quote (allows variable and command expansion) ' '     Full quote (no expansion) \     Quote following character $var     Use value for variable $$     Process id $0     Command name $n     nth argument (n from 0 to 9) $*     All arguments as a simple word #     Begin comment bg     Background execution break     Break from loop statements cd     Change directories continue     R

Writing Recursive Functions

How to Write Recursive Functions A recursive procedure is one that calls itself. Example is as follows – The following procedure uses recursion to calculate the factorial of its original argument. Function factorial(ByVal n As Integer) As Integer If n <= 1 Then Return 1 Else Return factorial(n – 1) * n End If End Function

UNIX Commands in Nutshell

UNIX Command Summary There are MANY commands available for you in a UNIX shell account. A list of them follows (in no particular order). Remember, you can always read the manpage on each command for more information. ls …………….. show directory, in alphabetical order logout …………. logs off system mkdir ………….. make a directory rmdir ………….. remove directory (rm -r to delete folders with files) rm …………….. remove files cd …………….. change current directory man (command) …… shows help on a specific command talk (user) …….. pages user for chat – (user) is a email address write (user) ……. write a user on the local system (control-c to end) pico (filename) …. easy to use text editor to edit files pine …………… easy to use mailer more (file) …….. views a file, pausing every screenful sz …………….. send a file (to you) using zmodem rz …………….. recieve a file (to the unix system) using zmodem telnet (host) …… connect to another Internet site ftp (host) ……… connects to a FTP site