Tuesday, October 30, 2007

OPS435W9

No double quotes the shell will automatically go into file name expansion, this was one problem with the assignment.
An example with this
Echo $bs|grep [^0-9]

New stuff

RCS

Revision Control System

What is RCS?
What is it used for?

What is the revision number of the current Linux kernel 2.6.28….the second number if its odd its development if its 6 it’s a working version.

What does the 28 mean, it tells you the 2.6 version has been 28 times since its release.
Bugs or any functionality that needs to be upgraded.

^^this is what its all about,

These numbers are not being tracked its being done by the RCS system, lets look at how it works,

We are going to be using this for our next assignment 2, this system will keep track of the changes you make all long, this will keep track with revision numbers like the kernel numbers in Linux, this is used when you graduate when you get a job you will work in groups and your working on a utility of some sort this system has to keep track of all the ongoings, and has to allow each member of the group to develop and making changes, and also prevent people outside of the group to not come in and make changes.

Version Management
You can use this program to keep track of data files or anything, all versions are stored as a single file, for instance when you have revisions there is only ONE file, you can have multiple revision in a single file, with RCS you can keep track of it, or you can ask it to what ever revision you want to work with, the system will go back and undo the changes you have done to work with.

Some commands

-rcs
-ci
-co

To initialize rcs you use rcs –i filename
RCS needs a unique director so we have created a directory called RCS
When you initiate files, the rcs will ask you to give a description what the files about the comma v is added to any file that is created in any RCS system this is created to say it’s a RCS file not a regular file, the file we have initiated it does contain the file of the original file, it has created a RCS shell around it

My New Prompt $RCS
-bash: RCS: command not found
My New Prompt $ls RCS/
age,v
My New Prompt $cat RCS/age,v
head ; version number
access; who has access to the file
symbols;
locks; strict;
comment @# @;



desc
@this is my assignment 1 file from OPS435
@

When you do assignment #2 you will have to give ur partner cause we will be only using 2 accounts, once you make this decision the other person will have to have access to the file,

You have to use the check commands to play with the file, you have to check the file in or check the file out, when someone is on it you cant use it.

Ci jj

This checks it into the RCS directory you never go into the jj,v you have to check it out, you can use
Co –l jj

You want to use co –l because then it will be locked, so no one else can use it and only you,

Ci jj

RCS –a command, to give access to the person, you add the name of the user with no space
Rcs –afcrusso age,v

Rlog to see the history of this file

Ex: rlog jj


My New Prompt $RCS
-bash: RCS: command not found
My New Prompt $ls RCS/
age,v
My New Prompt $cat RCS/age,v
head ;
access;
symbols;
locks; strict;
comment @# @;



desc
@this is my assignment 1 file from OPS435
@

You can branch off to different branches, the particular item will tell you which branch the tree is in.

Make more changes
Co –l age.v


There are a number of commands parted of the RCS system

.rlog – history of the command

Not using this semester

.ident – certain keywords
.rcsdiff – different of versions
.rcsmerge – merge files
.rcsclean – get rid of duplicate copies

Another system CBS and has many more functionalities.


And that’s our RCS.

On warning, if you initialize a file with the rcs –I as you know that’s just a shell does not contain the data of the file, if you were to check out the file, because the file does not contain data it will wipe out ur original file if you continue if will put nothing in your original file, do a check in before you do a check out.

When you encounter during the test some of the simple things, one thing that was expected the bonus question
Regular expressions
Find if $1 is an integer
Echo $1 | grep ‘[^0-9]’ || \$1
[ $1 –ge 0 ] 2> /dev/null
Expr $1 / 1

Thedate:

Cal|tail +3|wc –w
Cal|grep –v ‘[a-z]’

No comments: