Re: weird while shellscript problem-SOLVED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



| From: Manuel Arostegui Ramirez <manuel@xxxxxxxxxxxxxx>

| That was the script, well as you can see CURRENT_HOUR is being declared INSIDE 
| of the while loop, so....it was impossible to run if I didn't declare it 
| before the loop :-)

When I write a shell script, I almost always start it with
	set -u -e

The -u means: consider it an error to refer to an unset variable
The -e means: terminate on a command failing

This lets me catch my mistakes a lot earlier.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux