Re: Scripting help please

From: G V Raju (rajugv_at_INGVYSYABANK.COM)
Date: 05/04/05

  • Next message: Shawn Bierman: "[was] Scripting help please [now] sed help"
    Date:         Wed, 4 May 2005 19:00:00 +0530
    To: aix-l@Princeton.EDU
    
    
    

    IFS="\$"
    while read x
    do
    set $x
    echo $1"$"`echo $2|sed "s/,/*/g"`
    done < $1

    -----Original Message-----
    From: Prasad Pillarisetti [mailto:prasad@IDC.CENDURA.COM]
    Sent: 04/05/2005 6:51 PM
    To: aix-l@Princeton.EDU
    Subject: Re: Scripting help please

    Shawn,
    Thanks for the help.

    But one glitch, I need to output the whole line, not just the string after
    the $.

    109889-01 : 109353-04,109353-04 : : $ SUNWkvmx* SUNWkvm * SUNWctu*

    -----Original Message-----
    From: Shawn Bierman [mailto:BiermanS@METHODISTHEALTH.ORG]
    Sent: Wednesday, May 04, 2005 6:40 PM
    To: aix-l@Princeton.EDU
    Subject: Re: Scripting help please

    Like this?

    biermans@sf1n04en4:/home/biermans > cat xxx
    109889-01 : 109353-04,109353-04 : : $ SUNWkvmx, SUNWkvm, SUNWctu,
    SUNWmdb

    biermans@sf1n04en4:/home/biermans > cat xxx|awk -F'$' '{print $2}'|sed
    -e's/,/*/g'
     SUNWkvmx* SUNWkvm* SUNWctu* SUNWmdb

    >>> prasad@IDC.CENDURA.COM 5/4/05 7:59:13 AM >>>
    I need some scripting help please.

    I have a file which has the following output.
    I need to change the commas after the $ to a * (or any other character
    other than a comma).
    Only the commas after the $ need to be changed.

    109889-01 : 109353-04,109353-04 : : $ SUNWkvmx, SUNWkvm, SUNWctu,
    SUNWmdb

    Thanks in advance

    Prasad

    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005
    --
    No virus found in this incoming message.
    Checked by AVG Anti-Virus.
    Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005
    --
    No virus found in this outgoing message.
    Checked by AVG Anti-Virus.
    Version: 7.0.308 / Virus Database: 266.11.3 - Release Date: 5/3/2005
    
    



  • Next message: Shawn Bierman: "[was] Scripting help please [now] sed help"

    Relevant Pages