Find the answer to your Linux question:
Results 1 to 2 of 2
How do I combine these two lines into one to make the code less hassle? I want to create a variable to use in a function call. models_sales=(sales_cur sales_0 depl_cur ...
  1. #1
    Just Joined!
    Join Date
    Aug 2008
    Posts
    2

    pass array to function

    How do I combine these two lines into one to make the code less hassle? I want to create a variable to use in a function call.

    models_sales=(sales_cur sales_0 depl_cur depl_0)
    models_sales=`echo ${pmodels_sales[@]}`

  2. #2
    Just Joined!
    Join Date
    Aug 2008
    Posts
    2

    corrected script still wondering

    models_financial=(ams_ordinf ams_invbal ams_filterordinf ams_invbalpo ams_SNIordinf ams_openordinf)


    models_financial=`echo ${models_financial[@]}`

Posting Permissions

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