Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
basic sed help
Results 1 to 3 of 3

Thread: basic sed help

  1. #1

    basic sed help

    How do I strip the last character from a sentence using sed?

  2. #2

    Re: basic sed help


    How do I strip the last character from a sentence using sed?
    This would work for stripping the last character from a line (I am assuming that is what you want):
    Code:
    echo "some stuff" | sed -e 's/.$//'
    The . matches with any character, the $ anchors to the end of the line, we replace matches with null.

  3. #3

    Re: basic sed help

    Yes, line. Woops. Anyway, that was exactly the answer I was looking for. Thanks.

Similar Threads

  1. New PET ::: Apache 2.0 - Basic
    By Compunuts in forum Linux - General Topics
    Replies: 0
    Last Post: 03-11-2006, 07:07 AM
  2. very very basic questions
    By elovkoff in forum Linux - General Topics
    Replies: 8
    Last Post: 01-09-2004, 12:36 AM
  3. Basic GUI question
    By mcdougrs in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 05-19-2003, 11:49 PM
  4. Basic Networking
    By mugs in forum Linux - Hardware, Networking & Security
    Replies: 6
    Last Post: 11-12-2002, 12:17 AM
  5. Gnome Basic
    By nfallon in forum Linux - Software, Applications & Programming
    Replies: 13
    Last Post: 01-04-2002, 05:27 PM

Bookmarks

Posting Permissions

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