<<eof .... eof questions

Paul John Falstad pfalstad at phoenix.Princeton.EDU
Sun Sep 23 11:26:43 AEST 1990


In article <12127 at chaph.usc.edu> szeto at aludra.usc.edu (Johnny Szeto) writes:
>[shakyamuni:54 :~] foreach i (*2)
>? set g=`sed 's/\(.*\)2/\1/'<<fg
>? $r[$b]
>? fg`
>? mv $i $g
>? @ b++
>? end

If you must do this with csh, try something like this:

foreach i (*2)
set g=`echo $r[$b] | sed 's/\(.*\)2/\1/'`
mv $i $g
@ b++
end

I didn't bother to test it, but that's the general idea.

Also, you may want to try the 'shift' builtin rather than that
$r[$b], @ b++ stuff.

>I am quite a novice in programming C-shell.  Can someone give me some
>guidance?

So am I, and I'd like to keep it that way.  :-)

                This is the silliest sketch I've ever been in!



More information about the Comp.unix.shell mailing list