Script Format

Posted on 2011-05-07
Last Modified: 2012-05-11

I have this script which only keeps a-z characters and I want to keep numerical digits as well and certain characters. How would I specify this?

Thank you

sed '/^$/d' | sed 's/  */ /g' | tr A-Z a-z | sed  -e 's/\([a-z]\+\.\)\+\(RSS\OEM\|DEM\)[^ ]*//g' -e 's/[^a-z ]/ /g' -e 's/[         ]\+/ /g'
Question by:faithless1
    LVL 31

    Accepted Solution

    You can do


    Instead of [a-z]
    LVL 11

    Assisted Solution

    I think the:
      [^a-z ]
    part should be changed to:
      [^a-z0-9 ]
    as farzanj (almost) said.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
    A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (,  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now