unsubscribe

From: unixmavens (unixmavens_at_comcast.net)
Date: 10/13/05

  • Next message: giridhar.reddyk_at_wipro.com: "Samba: Problem with inetd"
    To: <sunmanagers@sunmanagers.org>
    Date: Wed, 12 Oct 2005 18:30:33 -0700
    
    

    ----- Original Message -----
    From: "Bhavesh Shah" <bshah@citadon.com>
    To: <sunmanagers@sunmanagers.org>
    Sent: Wednesday, October 12, 2005 12:56 PM
    Subject: SUMMARY: sed help

    > Well I got response from other forum just after I posted here.
    > Sorry for the trouble.
    >
    > The correct way is:
    >
    > Sed '/insert/r source_file' final_file > result_file
    >
    > Best Regards
    > B
    >
    > -----Original Message-----
    > From: Bhavesh Shah
    > Sent: Wednesday, October 12, 2005 12:40 PM
    > To: sunmanagers@sunmanagers.org
    > Subject: sed help
    >
    >
    > Hi Gurus,
    >
    > Sorry for the off topic. I am trying to get the script working but am
    > stuck. I tried googling and other unix forum but unable to get this
    > working so finally I turned to you gurus. I am struggling to get this
    > working since yesterday. If you can help me will be great help for me.
    >
    >
    >
    > #! /bin/ksh
    >
    >
    >
    > SOURCE=`cat source_file`
    >
    > echo $SOURCE
    >
    >
    >
    > sed '{
    >
    > /insert/a\
    >
    > '$SOURCE'
    >
    > }' final_file > result_file
    >
    >
    >
    > cat source_file
    >
    > test1
    >
    > test2
    >
    > test3
    >
    >
    >
    > cat final_file
    >
    > insert
    >
    >
    >
    > If source_file has only one line it works but multiple line fails with
    > sed error. The problem is my source_file is a variable and i can't put
    > it directly inside sed command.
    >
    > Any help is greatly appreciated.
    >
    > Sorry for the trouble.
    >
    > Regards
    >
    > B
    > _______________________________________________
    > sunmanagers mailing list
    > sunmanagers@sunmanagers.org
    > http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    > _______________________________________________
    > sunmanagers mailing list
    > sunmanagers@sunmanagers.org
    > http://www.sunmanagers.org/mailman/listinfo/sunmanagers
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: giridhar.reddyk_at_wipro.com: "Samba: Problem with inetd"

    Relevant Pages

    • SUMMARY: sed help
      ... Well I got response from other forum just after I posted here. ... Sorry for the trouble. ... Best Regards ... working so finally I turned to you gurus. ...
      (SunManagers)
    • Re: Cats just know..
      ... Our cat, Trouble, as has been mentioned on many occasions, rules like ... Trouble follows sick humans around ... "There is nothing patriotic about hating your country, ...
      (rec.sport.football.college)
    • Re: OT: aga challenge
      ... >>>between you and your cat. ... >> I realize you have trouble with complicated constructs like names, ... See Ether hump ankle. ...
      (alt.guitar.amps)
    • Re: New power transformers and choke pages at turneraudio.com.au
      ... Regards to all who are interested in tube audio craft, ... Some has been especially designed to not produce heat as it cures, ... The Chinese sometimes use cat litter:-) ...
      (rec.audio.tubes)
    • Re: Cats just know..
      ... rage. ... Our cat, Trouble, as has been mentioned on many occasions, rules ... invariably to their room where we'll find a child ...
      (rec.sport.football.college)