Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: sed

by Aristotle (Chancellor)
on Sep 20, 2002 at 12:53 UTC ( #199450=note: print w/replies, xml ) Need Help??


in reply to Re: Re^2: sed (was: Save all but line 32!)
in thread Save all but line 32!

It's 10 actually, I can leave out a space. sed -e32d filename
Also, yours is 12 keystrokes. And once we get to multiple files, yours grows linearly, mine is constant.. :^) for F in *;do sed -e32d "$F";done
(NB: a loop is necessary since we'll otherwise only delete the 32nd line of the first file.)

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^4: sed
by BrowserUk (Pope) on Sep 20, 2002 at 13:16 UTC

    Also, yours is 12 keystrokes.

    No. <^somechar> is meant to indicate that I need to type control+G. Ie. a single control key.

    Fair play to you on the multiple files though:)



    Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring!
Re: Re^4: sed
by runrig (Abbot) on Sep 20, 2002 at 17:48 UTC
    It's 10 actually, I can leave out a space.
    sed -e32d filename
    And in all of the sed implementations I've seen so far, you can leave out the '-e' since the first argument (when there's no -e) is by default assumed to be the sed script.
      Works indeed. So 8 characters for the sed way.. :-) ++

      Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://199450]
help
Chatterbox?
[TStanley]: I'm sitting in the airport in Tampa, Florida at the moment, getting ready to head home.
[talexb]: TStanley I'm flying to Vegas in two weeks time. After that flights leaving Vegas and Phoenix are late at night .. I've been hearing that it gets so hot that the air isn't dense enough for planes to take off. Weird. Guess you won't have that problem.
[Corion]: Yay, vacation time now - one week off work (but a Perl workshop in the middle ;)) )
[talexb]: TStanley I just realized that I was in your area for a convention back in April. We were at the high school for the weekend, the one with the long driveway. Nice spot.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2017-06-23 14:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (548 votes). Check out past polls.