Sunday, January 23, 2011

Inurl View.shtml Security

bash tip: Set output redirection from within a script

Small but useful tip.
If for some reason you need to set the redirection of a script ( and stdout / stderr or ) without using the redirection operators (as well described for example on the site dell'ILDP ) or directly from within the script from the command line, here's a possible solution:

 
# / bin / sh exec

> prova.log 2> & 1

echo "These two lines printed "
echo" will be in prova.log "

0 comments:

Post a Comment