how to concate strings and value

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • creeds
    New Member
    • Feb 2008
    • 14

    how to concate strings and value

    Helllo guys,

    i am not able to concate teh strings evn though i got lots of explaination reagding that in intrnet
    my problem is that..
    i read a value from a console and concat that with other strings like
    read rad_no
    echo '$rad_no'
    var= echo 'select fn_deleteradno( '
    var2= $rad_no
    var3= echo ')'
    $echo "[${var}]+[${var2}]${var3}"
    echo "$test"

    if i input rad_no as 62397984242

    how to add all to make select fn_deleteradno( 62397984242);

    thanking for any help
    creeds
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by creeds
    Helllo guys,

    i am not able to concate teh strings evn though i got lots of explaination reagding that in intrnet
    my problem is that..
    i read a value from a console and concat that with other strings like
    read rad_no
    echo '$rad_no'
    var= echo 'select fn_deleteradno( '
    var2= $rad_no
    var3= echo ')'
    $echo "[${var}]+[${var2}]${var3}"
    echo "$test"

    if i input rad_no as 62397984242

    how to add all to make select fn_deleteradno( 62397984242);

    thanking for any help
    creeds

    Concatenation is like this
    OUT="select fn_deleteradno( "$rad_no")"

    Raghuram

    Comment

    • creeds
      New Member
      • Feb 2008
      • 14

      #3
      Hello
      i tried with both these...
      but it shows error as it doesnt get $rad_no value when passed to select fn_deleteradno( )

      so i wanted to concat the strings and $rad_no value, but ur suggestion is not matching with my output,
      any suggestion
      creeds

      Comment

      • gpraghuram
        Recognized Expert Top Contributor
        • Mar 2007
        • 1275

        #4
        Originally posted by creeds
        Hello
        i tried with both these...
        but it shows error as it doesnt get $rad_no value when passed to select fn_deleteradno( )

        so i wanted to concat the strings and $rad_no value, but ur suggestion is not matching with my output,
        any suggestion
        creeds
        which shell u are using?
        Try using Bash or ksh

        Raghuram

        Comment

        Working...