Page 2 of 2 FirstFirst 12
Results 11 to 11 of 11

Thread: 'if' condition to add new PPA always produces a one sided result

  1. #11
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,273
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 'if' condition to add new PPA always produces a one sided result

    you are doing it wrong just feed the ppas as nice separate params, without these quotes spanning everything.

    Code:
    addit ppa:something/something ppa:something_else/something_else ppa:etc_app/etc_app
    $1 = ppa:something/something
    $2 = ppa:something_else/something_else
    $3 = ppa:etc_app/etc_app

    "$@" will take them one by one which is what you wanted to achieve with word splitting on single continuous $1. The difference is $@ way is the proper one
    Last edited by Vaphell; May 1st, 2014 at 04:36 AM.
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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