;$FOUT aa=`cat;$FOUT` rm;-f;$FOUT for;ii;in;$aa;;;do ftype=";" ftype=`file;$ii;|;awk;"{print;$2;}";` #;find;.;-type;f;-exec;file;{} #;1)。2 CVS RCS HOWTO 原始程式码版本控制系统( 六 )。" />

2 CVS RCS HOWTO 原始程式码版本控制系统( 六 )


|;awk;"{;if;($NF;!=;"core");print;$0;}";
|;awk;"{;print;$NF;}";>;$FOUT

aa=`cat;$FOUT`
rm;-f;$FOUT

for;ii;in;$aa;;;do
ftype=";"
ftype=`file;$ii;|;awk;"{print;$2;}";`

#;find;.;-type;f;-exec;file;{}
#;1)ELF;2)commands;3)[nt]roff,;4)c;5)English;;6)executable
#;7)ascii;8)current;9)empty
#;Binaries;are;ELF,;lib.a;are;current
#
if;[;"$ftype";=;"ascii";-o;"$ftype";=;"commands";
-o;"$ftype";=;"[nt]roff,";-o;"$ftype";=;"c";-o;"$ftype";=;"data";
-o;"$ftype";=;"English";-o;"$ftype";=;"executable";];;then
pcfile=`;echo;$ii;|;cut;-d".";-f1`
pcfile=${pcfile}".pc"
if;[;!;-f;$pcfile;];;then
ls;-l;$ii
else
if;[;"$ii";=;"$pcfile";];;then
ls;-l;$ii
fi
fi
fi
done;

#|;grep;-v;^-rwx;

#ls;-l;|;grep;^-rw;|;grep;-v;.o
#ls;-l;|;grep;^-rw;|;grep;-v;.o;|;awk;"{;if;($NF;!=;"tags");print;$0;}"
#ls;-l;|;grep;^-rw;|;grep;-v;^-rwx;|;grep;-v;.o;|;;awk;"{;if;($NF;!=;"tags");print;$0;}";|;awk;"{;if;($NF;!=;"core");print;$0;}"

#print;"nDone;$cmdname.;$cmdname;successful"
#print;"nTip;(Usage):;$cmdname;n"


--------------------------------------------------------------------------------

4.7;sinfo;
注意;:;Korn;shell;/bin/ksh;在你从Linux;CD-ROM;安装;pdksh*.rpm;时就会产生;

请把他存成一般文字档并改变存取权限;chmod;a rx;



--------------------------------------------------------------------------------

#!/bin/ksh

#;CVS;program;sinfo
#;Program;to;get;the;status;of;files;in;working;directory

cmdname=`basename;$0`

if;[;$#;-lt;1;];;then
print;"nUsage:;$cmdname;[file/directory;name];"
print;"For;example;-;"
print;";$cmdname;foo.cpp"
print;";$cmdname;some_directory;"
print;";"
exit
fi

hme=`;echo;$HOME;|;cut;-f1;-d";";;`
if;[;"$hme";=;"";];;then
print;"nError:;$HOME;is;not;set!!n"
exit
fi

tmpfile=$hme/cvs_sinfo.tmp
rm;-f;$tmpfile

cur_dir=`pwd`
#echo;$cur_dir

len=${#hme}
len=$(($len; ;2))
#echo;$len

subdir=`;echo;$cur_dir;|;cut;-b;$len-2000;`
#echo;$subdir

if;[;"$subdir";=;"";];;then
fdname=$1
else
fdname=$subdir"/"$1
fi

#;Create;subshell
if;[;-f;$1;];;then
(
cd;$hme
clear
cvs;status;$fdname;
)
elif;[;-d;$1;];;then
(
cd;$hme
clear
echo;";;";>>;$tmpfile
echo;";;****************************************";>>;$tmpfile
echo;"Overall;Status;of;Directory";>>;$tmpfile
echo;";;****************************************";>>;$tmpfile
cvs;release;$fdname;1>>$tmpfile;2>>$tmpfile;<<;EOF
Y
EOF
echo;"n;;;-------------------------------n";>>;$tmpfile

aa=`cat;$tmpfile;|;grep;^"M;";|;awk;"{print;$2}";`
for;ii;in;$aa;
do
jj="(cd;$hme;;cvs;status;$subdir/$ii;);"
echo;$jj;|;/bin/sh
|;grep;-v;Sticky;|;awk;"{if;(NF;!=;0);print;$0}";
1>>$tmpfile;2>>$tmpfile;
done

cat;$tmpfile;|;grep;-v;^?;|;grep;-v;"Are;you;sure;you;want;to;release";
|;less
rm;-f;$tmpfile
)
else
print;"nArgument;$1;if;not;a;file;or;directory"
exit
fi


--------------------------------------------------------------------------------

4.8;slog;
注意;:;Korn;shell;/bin/ksh;在你从Linux;CD-ROM;安装;pdksh*.rpm;时就会产生;

请把他存成一般文字档并改变存取权限;chmod;a rx;



--------------------------------------------------------------------------------

#!/bin/ksh

#;CVS;program;slog
#;Program;to;list;history;of;the;file;in;CVS;

cmdname=`basename;$0`

if;[;$#;-lt;1;];;then
print;"nUsage:;$cmdname;n"
exit
fi

#;Check;if;file;does;not;exist....
if;[;!;-f;$1;];;then
print;"nError:;$1;is;NOT;a;file.;Aborting;$cmdname;......"
exit
fi

cvs;log;$1;|;/usr/local/bin/less

print;"nDone;$cmdname.;$cmdname;successful"
#print;"nTip;(Usage):;$cmdname;n"


--------------------------------------------------------------------------------

推荐阅读