Hi, I'm a person living in the North East of England who has schizophrenia. I have been in and out of hospital between 2001-2004. This blog will be notes about my experiences as a patient (aka client) both in hospital and in the community. I can be contacted via email to ian DOT bruntlett AT gmail.com (delete the "DOT", "AT" and spaces from that email address). What is schizopanic? Its the panic that flashes through someone's eyes when you tell them you've got schizophrenia.
Wednesday, November 12, 2014
Tuesday, November 11, 2014
Done my first function in bash.
Been doing a lot of Linux system's administration studies recently. Finished reading "Linux Pocket Guide (2e)" from cover to cover for the first time ever.
Am returning to "Learning PHP, MySQL, JavaScript, CSS & HTML5".
In the meantime, here is a function newly written for my stufftar backup shell script...
function echo_and_log()
{
if [ $STUFFTAR_VERBOSE -gt 0 ]
then
echo echo_and_log : parameter count $#, logfile $1, text $2 $3 $4 $5 $6 $7 $8 $9
fi
if [ $# -lt 2 ]
then
echo "Error echo_and_log insufficient no of parameters";
return 1;
fi;
if [ ! -f $1 ]
then
echo WARNING $1 does not exist. Creating it now.
touch $1
fi;
echo `hostname` $2 $3 $4 $5 $6 $7 $8 $9
echo `hostname` $2 $3 $4 $5 $6 $7 $8 $9 >> $1
} # end function echo_and_log
Am returning to "Learning PHP, MySQL, JavaScript, CSS & HTML5".
In the meantime, here is a function newly written for my stufftar backup shell script...
function echo_and_log()
{
if [ $STUFFTAR_VERBOSE -gt 0 ]
then
echo echo_and_log : parameter count $#, logfile $1, text $2 $3 $4 $5 $6 $7 $8 $9
fi
if [ $# -lt 2 ]
then
echo "Error echo_and_log insufficient no of parameters";
return 1;
fi;
if [ ! -f $1 ]
then
echo WARNING $1 does not exist. Creating it now.
touch $1
fi;
echo `hostname` $2 $3 $4 $5 $6 $7 $8 $9
echo `hostname` $2 $3 $4 $5 $6 $7 $8 $9 >> $1
} # end function echo_and_log
Subscribe to:
Posts (Atom)