Welcome, Guest. Please login or register.

Author Topic: ed sometimes clears s bit  (Read 1146 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline rare_jTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 85
    • Show only replies by rare_j
ed sometimes clears s bit
« on: June 27, 2006, 01:16:11 PM »
Sometimes when I use ed to edit a script it clears the 's' protection bit, sometimes it doesn't.

Does anyone know why this is? Also is there a better program that I could use that doesn't mess with the file protection bits at all?
 

Offline Thomas

Re: ed sometimes clears s bit
« Reply #1 on: June 27, 2006, 02:25:48 PM »
Ed is a very basic program, it does not care at all about protection bits. The bits are changed to ----RWED whenever you save a file.

As a replacement I'd suggest CygnusEd. It is *the* text editor par excellence.

Bye,
Thomas

Offline mpiva

  • Sr. Member
  • ****
  • Join Date: Aug 2003
  • Posts: 297
    • Show only replies by mpiva
    • http://members.shaw.ca/michpiva
Re: ed sometimes clears s bit
« Reply #2 on: June 27, 2006, 05:21:43 PM »
  Ed will only preserve the "S" bit if the name remains EXACTLY the same.

For example, if you have the "s" protection bit on the startup sequence you have to use:

ed S:Startup-Sequence

and not

ed s:startup-sequence

The later will change the upper-case to lower-case and give the file the default "RWED" protection bits.
-- Michael A. Piva --


"In engineering, there is no single truth, no one right answer; there\'s a canvas, and you paint it your way, only with chips or gates or subroutines rather than actual paint. That\'s the Amiga..."
-Dave Haynie
 

Offline rare_jTopic starter

  • Jr. Member
  • **
  • Join Date: Mar 2006
  • Posts: 85
    • Show only replies by rare_j
Re: ed sometimes clears s bit
« Reply #3 on: June 28, 2006, 09:56:17 AM »
Thanks - that's been bugging me for ages