The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
search and replace a specific text in text file?
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
search and replace a specific text in text file?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
06-25-2008
Yogesh Sawant
Part Time Moderator and Full Time Dad
Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
your
sed
does not support the inline edit
-i
option.
using
Perl
:
Code:
perl
-pi -e 's/third line:Y/third line:N/' output.txt
Yogesh Sawant
View Public Profile
Visit Yogesh Sawant's homepage!
Find all posts by Yogesh Sawant
Find Yogesh Sawant's past nominations received
Find Yogesh Sawant's present nominations given