There is an arithmetic syntax error in the index of the month. $month at the moment returns the string "08" and $((month)) returns the error. I really have no idea why this is so and can't be arsed to find out. In python, it would be something like this: Code: #!/usr/bin/python from datetime import datetime months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] month = months[datetime.now().month-1] print month
#!/usr/bin/python from datetime import datetime months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] month = months[datetime.now().month-1] print month