Programming Challenges


Results 1 to 15 of 279

Thread: Programming Challenges

Threaded View

  1. #19
    Join Date
    Feb 2004
    Location
    Singapore
    Posts
    2,170
    Code:
    # echo "abc" | sed s/abc/`echo "123"`/
    123
    This shows that you can simply use
    Code:
    i=string
    sed s/somestring/`echo $i`/
    EDIT:: be careful of the ` ' and " ! They are all different and you need to terminate each opening with a closing of the same type! ' and " can be used interchangeably, while ` is the one that really causes things to be interpreted by the shell. It (the executing `) is usually above the tab button.
    Last edited by XiaoKJ; 01-07-2007 at 11:45 AM.
    Come under the reign of the Idiot King...
    Come to me ... I love linux!

    Registered Linux user: Idiot King #350544

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •