Re: sed, awk, or something...help meeeeeeeeeee

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2009-09-28 at 20:07 +0100, Sharpe, Sam J wrote:
> That alone doesn't fit your original specification:
> 
> [sam@samlap Desktop]$ sed -e '/BB/R file2' file1
> AA
> BB
> BBBB1
> CC
> DD
> 
> AA
> BB
> BBBB2
> CC
> DD
> 
> You specified that BB was to be /replaced/ with BBBB1, so you will
> need to do this:
> 
> [sam@samlap Desktop]$ sed -e '/BB/R file2' -e '/BB/d' file1
> AA
> BBBB1
> CC
> DD
> 
> AA
> BBBB2
> CC
> DD

My bad - I meant to say "insert" not replace because I had another
version of the that doesn't have "BB" in it.

Thanks for pointing it out to me, though.

Regards,

Ranbir

-- 
Kanwar Ranbir Sandhu
Linux 2.6.27.30-170.2.82.fc10.x86_64 x86_64 GNU/Linux 
08:36:24 up 9 days, 22:11, 2 users, load average: 0.16, 0.12, 0.08 


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux