TCSH 6.13 shell script can't re-write to a file

2004-09-10 Thread Myers, Paul R (Research)
I have a number of CSH/TCSH shell scripts that work with text files.
In several cases I want to remove/erase a file before I start writing to it
again. 

I simplified the problem to this example:
  #!/usr/bin/tcsh

  echo Hello  stuff
  rm -f stuff  
  echo Goodbye  stuff

After a recent tcsh upgrade (from 6.12.00-7 to 6.13.00-2), the 2nd echo
command will produce the following error:
stuff:  permission denied

The problem doesn't appear when run line-by-line from the command line, and
it doesn't appear when in a bash script.

Can anyone else verify this behavior?  
It seems like a windows sharing violation, does that make sense?


Thanks for your help,

Paul


 cygcheck_new.out 

begin 600 cygcheck_new.out
M#0I#6=W:[EMAIL PROTECTED])A=EO;B!$:6%G;F]S=ECPT*0W5RF5N=!3
M[EMAIL PROTECTED][EMAIL PROTECTED])I(%-E`Q,`Q,CHQ-#HS.`R,#`T#0H-E=I;F1O
M=W,@,C`P,!0F]F97-S:[EMAIL PROTECTED](#4N,!=6EL9`R,3DU(%-EG9I
[EMAIL PROTECTED]%C:R`S#0H-E!A=@Z4,Z7-Y9W=I;EQUW);]C86Q8FEN#0H)
M0SI8WEG=VEN7)I;@T*4,Z7-Y9W=I;EQB:6X-@E#.EQC6=W:6Y=7-R
[EMAIL PROTECTED],5(V7)I;@T*6,Z7]R86-L95QOF$X,5QB:6X-@EC.EQ0F]GF%M
M($9I;5S7$]R86-L95QJF5,2XQ+C=8FEN#0H)8SI=VEN;G1WES=5M
M,S(-@EC.EQW:6YN=`T*6,Z7'=I;FYT7%-YW1E;3,R7%=B96T-@EC.EQ0
MF]GF%M($9I;5S7$-O;6UO;B!:6QEUQ!9%P=5C(%-H87)E9%Q37-T
M96T-@EC.EQ%-E960W7$%C8V5SV]R:65S7`T*4,Z7-Y9W=I;EQB:6X-
M@T*3W5T'5T(9R;[EMAIL PROTECTED]8WEG=VEN7)I;EQI9YE[EMAIL PROTECTED]YO;G1S96,I
M#0I5240Z(#$X,3`V*'5S97(I($=)[EMAIL PROTECTED];6EN:7-TF%T;W)S*0T*
M-30T*$%D;6EN:7-TF%T;W)S*0T*#0I/[EMAIL PROTECTED])O;2!#.EQC6=W:6Y
M8FEN7ED+F5X92`H;G1S96,I#0I5240Z(#$X,3`V*'5S97(I($=)[EMAIL PROTECTED]
M*$%D;6EN:7-TF%T;W)S*0T*,AR;V]T*2`@(`@(`@(`@([EMAIL PROTECTED]
M;6EN:7-TF%T;W)[EMAIL PROTECTED]G,I#0H-E-YT1I[EMAIL PROTECTED]5TE.
M3E1WES=5M,S(-E=I;D1I[EMAIL PROTECTED]5TE.3E0-@T*0UE'5TE.([EMAIL PROTECTED]'1T
M2!N='-E8R-DA/344@/[EMAIL PROTECTED]8WEG=VEN7AO;65=7-EB-DU!2T5?
M34]$12`](!U;FEX)PT*#0I!3$Q54T524U!23T9)3$4@/[EMAIL PROTECTED]1]C=6UE
M;G1S(%N9!3971T:6YGUQ!;[EMAIL PROTECTED]G,G#0I#3TU-3TY04D]'4D%-1DE,
M15,@/[EMAIL PROTECTED]4')O9W)A;2!:6QEUQ#;VUM;[EMAIL PROTECTED],G#0I#3TU34$5#
M([EMAIL PROTECTED],Z7%=)3DY47'-YW1E;3,R7-M9YE4G#0I#55-41$E2([EMAIL PROTECTED],Z
M7$-UW1PF5P)PT*1%)61$E2([EMAIL PROTECTED],Z7$125B-D=23U50([EMAIL PROTECTED];6EN
M:7-TF%T;W)S)PT*2$]-1412259%([EMAIL PROTECTED],Z)PT*2$]35%194$4@/2!@:3,X
M-B-DU!0TA)3D5?5%E012`](!$15-+5$]0)PT*34%#2%194$4@/2!@:3,X
M-B-DU!3E!!5$@@/[EMAIL PROTECTED]W(OW-L+VUA;B-DY534)%4E]/1E]04D]#
M15-33U)3([EMAIL PROTECTED](G#0I/4S),24)0051(([EMAIL PROTECTED],Z7%=)3DY47'-YW1E;3,R
M7]S,EQD;P[)PT*3U,@/[EMAIL PROTECTED]]WU].5-D]35%E012`](!P;W-I
M-E!!5$A%6%0@/[EMAIL PROTECTED]/33LN15A%.RY050[+D--1#LN5D)3.RY60D4[
M+DI3.RY*4T4[+E=31CLN5U-()PT*4%)/0T534T]27T%20TA)5$5#5%5212`]
M(!X.#8G#0I04D]#15-33U)?241%3E1)1DE%4B`]([EMAIL PROTECTED]:6QY(#$U
M($UO95L(#(@4W1E'!I;F@[EMAIL PROTECTED]5L)PT*4%)/0T534T]2
M7TQ%5D5,([EMAIL PROTECTED])PT*4%)/0T534T]27U)%5DE324].([EMAIL PROTECTED],#4G#0I0
M4D]'4D%-1DE,15,@/[EMAIL PROTECTED]4')O9W)A;2!:6QER-E-(14Q,([EMAIL PROTECTED]]B
M:6XO=-S:-E-(3%9,([EMAIL PROTECTED]([EMAIL PROTECTED],Z7%=)
M3DY4)PT*4U-(7U1462`](`O95V+W1T3(G#0I365-414U$4DE612`](!#
M.B-E-94U1%35)/3U0@/[EMAIL PROTECTED]5TE.3E0G#0I415)-([EMAIL PROTECTED]-Y9W=I;B-
ME194$4@/[EMAIL PROTECTED]')E8VES:6]N)PT*5%H@/[EMAIL PROTECTED],2XP+S(L
M33$P+C4N,\R)PT*5D5.1$]2([EMAIL PROTECTED]EN=5L)PT*5TE.1$E2([EMAIL PROTECTED],Z7%=)
M3DY4)PT*4$]325A,65]#3U)214-4([EMAIL PROTECTED]DA+15E?0U524D5.5%]5
M4T527%-O9G1W87)E7$-Y9VYUR!3;VQU=EO;G,-DA+15E?0U524D5.5%]5
M4T527%-O9G1W87)E7$-Y9VYUR!3;VQU=EO;G-0WEG=VEN#0I(2T597T-5
M4E)%3E1?55-%4EQ3;V9T=V%R95Q#6=N=7,@4V]L=71I;VYS7$-Y9W=I;EQM
M;W5N=',@=C(-DA+15E?0U524D5.5%]54T527%-O9G1W87)E7$-Y9VYUR!3
M;VQU=EO;G-0WEG=VEN7%!R;[EMAIL PROTECTED]:6]NPT*2$M%65],3T-!3%]-
M04-(24Y%7%-/1E1705)%7$-Y9VYUR!3;VQU=EO;G,-DA+15E?3$]#04Q?
M34%#2$E.15Q33T945T%215Q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AIL PROTECTED]4R`@(#$T,#`Q,4UB(`Q.[EMAIL PROTECTED]@0U,@[EMAIL 

Re: TCSH 6.13 shell script can't re-write to a file

2004-09-10 Thread Isaac Foraker
I just tried this and had the same problem:
 echo Hello  Stuff
 rm -f Stuff
 echo Goodbye  Stuff
Stuff: Permission denied.
 ls -l Stuff
ls: Stuff: No such file or directory
 tcsh --version
tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-posix) options 
8b,nls,dl,al,kan,rh,color,dspm
 uname -a
CYGWIN_NT-5.1 xcoisaacf20 1.5.11(0.116/4/2) 2004-09-04 23:17 i686 
unknown unknown Cygwin

IF
Myers, Paul R (Research) wrote:
I have a number of CSH/TCSH shell scripts that work with text files.
In several cases I want to remove/erase a file before I start writing to it
again. 

I simplified the problem to this example:
 #!/usr/bin/tcsh
 echo Hello  stuff
 rm -f stuff  
 echo Goodbye  stuff

After a recent tcsh upgrade (from 6.12.00-7 to 6.13.00-2), the 2nd echo
command will produce the following error:
stuff:  permission denied
The problem doesn't appear when run line-by-line from the command line, and
it doesn't appear when in a bash script.
Can anyone else verify this behavior?  
It seems like a windows sharing violation, does that make sense?

Thanks for your help,
Paul
cygcheck_new.out 
 


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: TCSH 6.13 shell script can't re-write to a file

2004-09-10 Thread neal somos
If you use /bin/echo the problem goes away.

I can reproduce the problem with tcsh and
when using /bin/echo instead of the builtin, 
I get the expected behavior.

Apparently the built-in echo functions differently.

neal



___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



RE: TCSH 6.13 shell script can't re-write to a file

2004-09-10 Thread Myers, Paul R (Research)

Thanks Neal, 

I had assumed the issue was with the rm statement, and was experimenting
there.

Some experimentation shows the problem is with the first echo statement.
If I replace the first echo statement with /bin/echo or even printf
the second echo statement works fine. 

So, as you said, the TCSH echo statement has the strange behavior.
I guess it doesn't release the file, or close a pipe or something.

Thanks again, this is a good workaround.

Paul

-Original Message-
From: neal somos [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 1:15 PM
To: [EMAIL PROTECTED]
Subject: Re: TCSH 6.13 shell script can't re-write to a file


If you use /bin/echo the problem goes away.

I can reproduce the problem with tcsh and
when using /bin/echo instead of the builtin, 
I get the expected behavior.

Apparently the built-in echo functions differently.

neal



___
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/