How did you run script? You must type ./[name of script] - this "./" means the same folder.