swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UNIX tips for SWARM FAQ. Please Contribute, prove your team spirit!


From: Ginger Booth
Subject: Re: UNIX tips for SWARM FAQ. Please Contribute, prove your team spirit!
Date: Mon, 25 Aug 97 14:16:43 EDT

Paul,
    A few top workhorses:  diff, wc, pipe-grep, and tar-zip.

diff --------------------------------------------------------------------

Compare (few) source code changes between versions.

The way I use it, in .cshrc, I added:

alias cmf '/usr/local/bin/diff -b --ignore-space-change --minimal -s -C 1 '

so I can use the command "cmf" instead of specifying options to "diff". 
Please consult "man diff" for your options.

use:

    maple{ginger} 66:  cmf source/Diffuse.h fromjanwith/Diffuse.h
        *** source/Diffuse.h    Mon Jul 21 13:25:51 1997
        --- fromjanwith/Diffuse.h       Mon Aug 18 13:13:12 1997
        ***************
        *** 2,4 ****
        
        ! #import <swarmobject.h>
        #import "Base.h"
        --- 2,4 ----
        
        ! #include <swarmobject.h>
        #import "Base.h"
        ***************
        *** 63,64 ****
        --- 63,65 ----
        -copymom;             // self=mom, returns copy
        + -copyTo: (DiffuseQuad*) newbie;       // no alloc
        -addSiteParams;
        ***************
        *** 102,103 ****
        --- 103,105 ----
        -(int) getCellsY;
        + -(int) getSubSteps;
        -setSubSteps: (int) i;
        
It's hard to get really legible output out of this, but the above says 
I changed (!) an import to an include (lines 2-4 shown for context), and
added (+) two routines (lines 64 and 104 in the 2nd file.)

wc ---------------------------------------------------------------------

Count lines of code, as a rough progress measure or version compare.

    maple{ginger} 70:  wc -l source/*.m
        127 source/Base.m
        416 source/Carnie.m
        ...
        39 source/main.m
        14394 total
   
pipe grep -------------------------------------------------------------

An approach to finding arbitrary things by string match.
 
    maple{ginger} 71:  ps -ef | grep netscape
        ginger 24257 24088  0 13:10:26 ttyp4    0:04 netscape -install

    maple{ginger} 72:  ls -al /tmp | grep "Aug 25"
        drwxrwxrwx   3 root     root       37888 Aug 25 13:40 .
        -rw-r--r--   1 ginger   staff          0 Aug 25 10:17 SPCBAAa23733
        -rw-------   1 ginger   staff        366 Aug 25 10:46 jea23850
        -rwx------   1 ginger   staff     771475 Aug 25 13:37 mbox.ginger
        -rw-------   1 ginger   staff       1724 Aug 25 13:40 snd.24249

tar-zip -------------------------------------------------------------------

Checkpoint development with a compressed backup.  Also good for tossing
source to a friend.

    maple{ginger} 103:  tar -cvf backups/prestats.tar source
        a source/Base.m 8 blocks
        a source/Critter.m 33 blocks
        ...
    maple{ginger} 104:  ls backups
        prestats.tar    ...
    maple{ginger} 107:  gzip backups/prestats.tar
    maple{ginger} 108:  cd backups
        /users/ginger/Sgecko/gecko/backups
    maple{ginger} 109:  ls
        prestats.tar.gz ...
    maple{ginger} 113:  tar -xvf prestats.tar
        x source/Base.m, 3674 bytes, 8 tape blocks
        x source/Critter.m, 16419 bytes, 33 tape blocks
        ...
    maple{ginger} 114:  ls
        prestats.tar    source

Ciao,
    Ginger
    

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]