Welcome, Guest. Please login or register.

Author Topic: Ed and protection bits  (Read 1042 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show only replies by golem
Ed and protection bits
« on: December 19, 2004, 12:17:27 PM »
Sorry if this is a bit thick of me but I have an annoying problem thats just come back after disappearing for a while. Whenever I open a file with ed when I save it it sets the protection bits of that file to read only. So when I next go to edit the same file I have to set it to rwed again if I want to save it. It is very annoying and I can't remember what I did to get rid of it. Thanks... :-?
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: Ed and protection bits
« Reply #1 on: December 19, 2004, 12:40:33 PM »
I recall some similar trouble back in Os3.0 relating to ed.

What I did was to rename ed to ed.exe and then write a small dos script wrapper for it and call that ed. The sript would use the protect command to set the protection bits before trying to open the file (and also attempts to after the executable quits).
int p; // A
 

Offline golemTopic starter

  • Sr. Member
  • ****
  • Join Date: May 2002
  • Posts: 432
    • Show only replies by golem
Re: Ed and protection bits
« Reply #2 on: December 19, 2004, 02:11:25 PM »
Yes I remember doing that now but I think I saw a proper fix on here as well which means you don't have to do that. Buggered if I can remember. Thanks
                                                             
A1200 desktop, Blizzard 1260, OS3.9BB2, Indivision Mk II, SCSI Jaz, Ethernet
A1200 desktop, Blizzard 1230, OS3.1, Ethernet
A500, OS1.3