BusinessObjects Board

Issue with calling unix shell script with space in parameter

Requirement is to send an email from Data Services .

We have tried SMTP_TO (We can send an email) but Data Services adds the Job Name to the Email, which cannot be configured.

We wrote a shell script calling mailx with 3 parameters (email, subject, message).

When i call the script from Data Services using exec

exec(’/usr/bin/ksh’,‘test.sh ‘email’ ‘subject’ ‘text’’,8) the email works perfectly.

If i add a space in the subject or the text , Unix returns an error (too many parameters passed)
exec(’/usr/bin/ksh’,‘test.sh ‘email’ ‘sub je ct’ ‘te xt to process’’,8)

I have tried using variables, escapoe characters and also addition double quotes around the string

exec(’/usr/bin/ksh’,‘test.sh ‘email’ “‘sub je ct’” “‘te xt to process’”’,8)

This does not return any errors but does not send an email.

Please send me your suggestions


Siddhardha :uk: (BOB member since 2005-04-25)

Resolved the issue

I have changed the call to the unix script. I have used Double quotes around the text which solves the problem and sends an email

This works
exec(’/usr/bin/ksh’, ‘test.sh “[email]” “[subject]” “[Message]”’,8);


Siddhardha :uk: (BOB member since 2005-04-25)