From: biff@biff.gbdata.com (Dwight Everhart)
Newsgroups: comp.sys.next.misc
Subject: Re: Is there a "cut" command available for the NeXT ???
Date: Sun, 13 Dec 1992 15:40:44 GMT

In article <1992Dec9.030102.5535@leland.Stanford.EDU> buc@leland.Stanford.EDU  
(Robert Richards) writes:
> I cannot find the 
> 
> 	cut 
> 
> command on my NeXT box but it is on my SUN and DEC.  Is this command
> on the next or is there source code available from which I could
> compile.

The cut command is not distributed with NextStep, but this shell-script  
approximation might meet your needs:

begin 555 cut
M(R$O8FEN+W-H"B,@4VAE;&PO87=K('9E<G-I;VX@;V8@4WES=&5M(%8@8W5T
M*#$I(&-O;6UA;F0*(R!)<R!N;W0@9G5L;'D@8V]M<&%T:6)L92P@;F]R(&]P
M=&EM:7IE9"`H+6,@;W!T:6]N(&ES(%-,3U<I+@HC($EN8V]M<&%T:6)I;&ET
M:65S(&EN8VQU9&4*(R`@+2!$:69F97)E;G0@9&EA9VYO<W1I8W,*(R`@+2!!
M<F)I=')A<GD@;&EM:71S(&]N(&YU;6)E<B!O9B!C;VQU;6YS+V9I96QD<R!I
M="!W:6QL(&]U='!U=`HC("`M($1O97,@;F]T('!R;V-E<W,@9&5L:6UI=&5R
M+6QE<W,@<F5C;W)D<R!P<F]P97)L>0HC("`M($1O97,@;F]T(&EM<&QE;65N
M="!T:&4@+7,@;W!T:6]N"@HC(%=R:71T96X@8GD@2F]N($QA0F%D:64@*'!R
M:6YC971O;B%J;VYL86(A:F]N*2!I;B!*=6QY+"`Q.3DP('=H:6QE"B,@=&5A
M8VAI;F<@82!53DE8(%1O;VQS(&-L87-S(&]N(&$@6&5N:7@@<WES=&5M('1H
M870@9&ED(&YO="!I;F-L=61E"B,@8W5T+B`@5&AE(&-O;6UA;F0@=V%S(&YE
M961E9"!F;W(@<V]M92!O9B!T:&4@8VQA<W,@97AE<F-I<V5S+@H*(R!);B!N
M;R!W87D@=V]U;&0@22!R96-O;6UE;F0@:70@8F4@=7-E9"!A<R!A(')E<&QA
M8V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