wangf@unixg.ubc.ca (Frank Wang) (06/11/91)
Is that possible to delete some lines from a file (the file is so large that it's impossible to use any editor) without evoking any editors? Thanx in advance.
boyd@prl.dec.com (Boyd Roberts) (06/11/91)
In article <1991Jun11.005942.22241@unixg.ubc.ca>, wangf@unixg.ubc.ca (Frank Wang) writes: > Is that possible to delete some lines from a file (the file is so large that > it's impossible to use any editor) without evoking any editors? Eh? Why not just use sed(1)? Or, at a pinch, grep(1). Boyd Roberts boyd@prl.dec.com ``When the going gets wierd, the weird turn pro...''
darcy@druid.uucp (D'Arcy J.M. Cain) (06/11/91)
In article <1991Jun11.005942.22241@unixg.ubc.ca> Frank Wang writes: >Is that possible to delete some lines from a file (the file is so large that >it's impossible to use any editor) without evoking any editors? Well "rm name" should remove a few lines. :-) Seriously, there are so many tools to do what you want but without knowing the details how can anyone help? You can use "grep -v text file" to remove any line in file with the word "text" in it. There are various ways to use sed to get rid of selected lines and awk can be especially flexible. The simplest method is just to "split" the file and edit the resulting files separately but this involves the use of an editor which you don't want to do. Of course that was probably just an error of defining the solution when you really should be defining the problem. :-) HTH. -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | There's no government Toronto, Ontario, Canada | like no government! +1 416 424 2871 |