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

Shell script to paste same file again inside file but append n to each iteration

  • 22-01-2011 8:29pm
    #1
    Registered Users, Registered Users 2 Posts: 5,682 ✭✭✭


    Hi folks

    Ok heres my issue

    I have a file containing configuration info for 1 node

    I want to make the file so that i can configure 100 such nodes . Nothing changes except the node name

    So if i call the first one "node1", i want to do the second as "node2", third as node3 etc

    Here is the pseudocode

    n=1
    while (n <=100)
    do
    Append the value of n to the value of the node in this file
    n=n+1
    end do

    Is there a handy shell script command to do ? My sed and awk is rusty at best

    Thanks if you can help


Comments

  • Registered Users, Registered Users 2 Posts: 2,781 ✭✭✭amen


    There is a least post on this already. Search the forum you should find it.

    Might be from 2-3 years ago


Advertisement