Re: weird while shellscript problem-SOLVED

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

 



El Viernes, 8 de Junio de 2007 01:14, D. Hugh Redelmeier escribió:
> | 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.

Oh, Hugh, that's a great trick, thanks, I'll use it from now on
Have a good weekend
-M

-- 
Manuel Arostegui Ramirez.

Electronic Mail is not secure, may not be read every day, and should not
be used for urgent or sensitive issues.


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

  Powered by Linux