Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12

Thread: Shell Commands

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Mar 2004

    ed editor commands


    does anyone knows how to append a line in ed mode?.

    i tried

    a testing
    a 'testing'
    a "testing"

    i read the man pages but they din show example of simple command in the ed mode. hmmm
    or shld the 'a' be at the back of the words to be append?

  2. #12
    Just Joined!
    Join Date
    Nov 2012
    Quote Originally Posted by kpzani View Post
    I've got the second one:

    egrep '^[^ABCDEFGHIJKLMNOPQRSTUVWXYZae].*ae.+' words

    so first carat = match start of string
    upper didn't work for me neither did [^A-Zae] so replaced it with long string above
    followed by .* any character repeated zero or more times.
    followed by any char at least once.
    There is a slight error with that, as it will block words starting with a or e, not just ae, so Encyclopaedia & anaesthesia are also blocked from the /etc/share/dict/words file.

    I found the following seems to do the job (at least it does for me):

    grep -E '^[^(ae)]?^[^ABCDEFGHIJKLMNOPQRSTUVWXYZ].*ae.+'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts