Re: Bash - an odd problem using sed or awk or for

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

 



On Sat, 2012-12-01 at 23:25 -0430, Patrick O'Callaghan wrote:
> On Fri, 2012-11-30 at 21:37 -0700, Greg Woods wrote:
> > On Thu, 2012-11-29 at 23:33 +0000, John Horne wrote:
> > 
> > > ============ (the '=' are not part of the variable)
> > > abc def
> > > 
> > > hijk
> > > xyz
> > > ============
> > > 
> > > So in this case what is wanted is:
> > > 
> > > ============
> > > hijk
> > > xyz
> > > ============
> > > 
> > > to be shown.
> > 
> > echo "$XX" | sed -e '1,/^$/d'
> 
> This will delete lines up to and including the first blank line. The
> OP's problem statement isn't very clear, but I think he wants to delete
> everything up to and including the last blank line, if any.
> 
Correct.



John.

-- 
John Horne, Plymouth University, UK
Tel: +44 (0)1752 587287    Fax: +44 (0)1752 587001

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux