Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: HI problem with find and replace

    Hi my name is Jose

    I need help in find and replace with linux
    I have the nex code :

    find . -name '*.shtml' -exec perl -p -i -e 's/7jdu2msjd69395s-->/7jdu2msjd69395stttxxxppp333444-->/i' '{}' \;

    but when i want to put this

    find . -name '*.shtml' -exec perl -p -i -e 's/ObjectList: 7jdu2msjd69395s-->/ObjectList: 7jdu2msjd69395stttxxxppp333444-->/i' '{}' \;

    this code no find anything if some one knows how i can do this i will be very greatfull

  2. #2
    Join Date
    Mar 2004
    Posts
    3

    Re: HI problem with find and replace

    Originally posted by joalpeca1
    Hi my name is Jose

    I need help in find and replace with linux
    I have the next code :

    find . -name '*.shtml' -exec perl -p -i -e 's/7jdu2msjd69395s-->/7jdu2msjd69395stttxxxppp333444-->/i' '{}' \;

    but when i want to put this

    find . -name '*.shtml' -exec perl -p -i -e 's/ObjectList: 7jdu2msjd69395s-->/ObjectList: 7jdu2msjd69395stttxxxppp333444-->/i' '{}' \;

    this code no find anything if some one knows how i can do this i will be very greatfull

  3. #3
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    Are you sure that there is just a space between 'ObjectList:' and '7jdu' ?
    Try this :

    find . -name '*.shtml' -exec perl -p -i -e 's/ObjectList:[[:space:]]+7jdu2msjd69395s-->/ObjectList: 7jdu2msjd69395stttxxxppp333444-->/i' '{}' \;
    Jean-Pierre.

Posting Permissions

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