I have this python script :

```
    for item in users:
        User.objects.create(
                website = item['']
                myspace_name = item['']
                last_name = item['']
                public_favorites_count = item['']
                followings_count = item['']
                full_name = item['']
                user_id = item['']
                city = item['']
                first_name = item['']
                track_count = item['']
                playlist_count = item['']
                discogs_name = item['']
                followers_count = item['']
                online = item['']
                username = item['']
                description = item['']
                kind = item['']
                last_modified = item['']
                website_title = item['']
                permalink_url = item['']
                permalink = item['']
                country = item['']
                uri = item['']
                avatar_url = item['']
                plan = item['']
            )

```

The goal is to write a script to change the file like :

```

...
                    avatar_url = item['avatar_url']
                    plan = item['plan']
...

```

i tried this one but it didn't work.

```
#!/bin/bash

FILE = "/home/user/metadata.py"

clear

declare -a array
declare -i i=0

grep 'item\[' /home/user/metadata.py | while read line

do
    array[i] = $(awk '{print $1}')
    sed "s/item\['/item\['array[$i]/" 
    let i++
done

```

Any help please, to correct the script and if there is a better solution for this. Thanks