This is my script called dbfunctions.ksh:
function LOGF
{
tstamp=`date '+%d/%m/%y %X'`
echo "$tstamp ${1}" >> $LOG
return 0
}
LOG=test.log
First I pass the command set -x
but when I run the script the following error occurs. I cannot see anything wrong.
. ./dbfunctions.ksh
+ . ./dbfunctions.ksh
++ $'\r'
: command not found
++ $'\r'
: command not found
'bash: ./dbfunctions.ksh: line 17: syntax error near unexpected token `{
'bash: ./dbfunctions.ksh: line 17: `{
function LOGF
{
tstamp=`date '+%d/%m/%y %X'`
echo "$tstamp ${1}" >> $LOG
return 0
}
LOG=test.log
First I pass the command set -x
but when I run the script the following error occurs. I cannot see anything wrong.
. ./dbfunctions.ksh
+ . ./dbfunctions.ksh
++ $'\r'
: command not found
++ $'\r'
: command not found
'bash: ./dbfunctions.ksh: line 17: syntax error near unexpected token `{
'bash: ./dbfunctions.ksh: line 17: `{