Re: Sed, insert a file current line

From: rakesh sharma (sharma__r_at_hotmail.com)
Date: 11/20/03


Date: 19 Nov 2003 22:49:22 -0800


* Tong * <sun_tong@users.sourceforge.net> wrote in message news:<292fd8a71b89d833cc53eb5191e5e726@news.teranews.com>...
> Hi,
>
> It is quite easy to include/append a file after a criteria line in sed by
>
> '/criteria/ r file'
>
> command. But is it possible to insert a file before a criteria line in
> sed? If not, is there another simple tool (not perl) that can do it?
>
> Thanks

sed -e '
  /criteria/{
     x;p
     r file
     x
  }
  h
' yourfile

note: this is not thoroughly tested as consecutive /criteria/ lines
will misbehave.



Relevant Pages

  • Re: Remove Rows in a List Box after fields are updated
    ... The crieria populates the list box... ... Query has the criteria set to NOT show on list if Term Date is ... No command button needed. ... Once the data is entered thru the text boxes, ...
    (microsoft.public.access.forms)
  • Re: Search records that will show up in a list box on a form.
    ... >>> I have created command buttons that look for specific criteria from ... >>> query table. ... you could create a query that uses your criteria and base a report ... Private Sub cmdFilter_Click ...
    (microsoft.public.access.forms)
  • Re: 2 Form Questions for the Group...
    ... You cannot use a multi-select list box directly as the criteria in a query, ... > Is there a command that will allow me to match ... > I have a form with list boxes that I am using to select filter criteria ...
    (microsoft.public.access.queries)
  • Re: Using a form to select records
    ... which I can make visible by clicking a command ... If you prefer to use a pop-up form I think you will need ... The criteria would then refer to the pop- ... set up the parameter query. ...
    (microsoft.public.access.forms)
  • RE: searching usinig unbound form in visual basic
    ... You need to concatenate the 2 criteria and put an "and" in between like ... > will open a seperate form with a command button. ... > Dim stLinkCriteria As String ...
    (microsoft.public.access.formscoding)