Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Changing contents of a LIST with a for loop

  • 09-09-2008 10:48am
    #1
    Registered Users, Registered Users 2 Posts: 5,659 ✭✭✭


    Hi this doesnt seem to work. Is there a way of changing the contents of an entire list?


    LIST1="RBS01 RBS02 RBS03 RBS04 RBS05"
    echo "LIST1 CURRENTLY $LIST1"
    for RBS in $LIST1
    do
    RBS="Changed$RBS"
    done
    echo "LIST1 CURRENTLY $LIST1"


Comments

  • Registered Users, Registered Users 2 Posts: 6,465 ✭✭✭MOH


    Language?


  • Closed Accounts Posts: 10 uasal2000


    asumming php, your list needs to be cast as such otherwise it's just a string ie list("rbs01","rbs02")

    if this is perl then you can refer to the array using @ modifier instead of $ and split the array with qword.

    Hope this helps


Advertisement