in reply to Re^3: Strange problem trying to clean garbage from start of mailbox file
in thread Strange problem trying to clean garbage from start of mailbox file

Damn, sed on BSD dosn't have the -i option. I'll have a look at the man page to see if there is another way to do an in-place edit.
  • Comment on Re^4: Strange problem trying to clean garbage from start of mailbox file

Replies are listed 'Best First'.
Re^5: Strange Problem
by graff (Chancellor) on Feb 03, 2006 at 03:29 UTC
    Um, what sort of BSD are you using? When I do "man sed" on freebsd (and the bsd-based darwin on my mac), I see:
    -i extension Edit files in-place, saving backups with the specified extension +. If a zero-length extension is given, no backup will be saved. I +t is not recommended to give a zero-length extension when in-place editing files, as you risk corruption or partial content in situ +- ations where disk space is exhausted, etc.
      Not sure which flavour of BSD is installed on this box as I didn't set it up myself, however sed -i produces :
      sed: illegal option -- i usage: sed script [-an] [file ...] sed [-an] [-e script] ... [-f script_file] ... [file ...]