Results 1 to 15 of 1264

Thread: TivoWebPlus 2.1 Testing and Development

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Mar 2005
    Posts
    235
    spitfires,

    Couldn't the carrage return also be stripped using the built in bash substitution command instead of using tr?

    Something like this:
    Code:
    get_config() {
      grep -i "^$1" $2 |\
      while read lhs eq rhs; do
        ret="${rhs//^M/}"
        echo "${ret//\"/}"
      done
    }
    Edited to use the actual carriage return "^M" instead of "$'\r'", as the latter only worked on my linux box not my THD.
    Last edited by jkozee; 01-14-2013 at 04:39 PM.

Posting Permissions

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