BOB: Business Objects Board
Not endorsed by or affiliated with SAP

Register | Login 

Want to sponsor BOB? 
Want to sponsor BOB? (Opens a new window)  

General Notice: No events within the next 45 days.

exec command for linux


 
Search this topic... | Search DI: Designer and Job Design... | Search Box
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Author Message
etlbods
Forum Member
Forum Member



Joined: 11 Oct 2018

Posts: 3



PostPosted: Thu Oct 11, 2018 3:20 pm 
Post subject: exec command for linux

I am trying to execute a series of linux commands using exec and they don't work. A simple test I am using:

exec('/bin/sh', '-c "echo Total Files Received: [$GV_RecvdCount] >> [$GV_BK_OUTPUT_FILE_PATH]/BKDailylog.txt"' ,8);

any help please.....
Back to top
jlynn73
Forum Associate
Forum Associate



Joined: 27 Oct 2009

Posts: 554
Location: DesMoines Iowa


flag
PostPosted: Fri Oct 12, 2018 7:34 am 
Post subject: Re: exec command for linux

when you put quotes "around a bunch of words with spaces in between them" you turn them all into one big argument.
Back to top
etlbods
Forum Member
Forum Member



Joined: 11 Oct 2018

Posts: 3



PostPosted: Fri Oct 12, 2018 2:12 pm 
Post subject: Re: exec command for linux

So, how do you recommend doing this requirement ?
Back to top
etlbods
Forum Member
Forum Member



Joined: 11 Oct 2018

Posts: 3



PostPosted: Mon Oct 15, 2018 2:19 pm 
Post subject: Re: exec command for linux

Anyone have any suggestion ? anybody encountered this requirement ? how are you handling it ?
BODS has issues when executing linux/unix commands with spaces in the arguments..any fixes or workarounds will be a great help !!
Back to top
Hope
Principal Member
Principal Member



Joined: 29 Mar 2011

Posts: 104


flag
PostPosted: Thu Nov 29, 2018 9:34 pm 
Post subject: Re: exec command for linux

Would also like to know how this is resolved. I am currently using an exec command to call a vb script but it doesn't seem to be working.
Back to top
jlynn73
Forum Associate
Forum Associate



Joined: 27 Oct 2009

Posts: 554
Location: DesMoines Iowa


flag
PostPosted: Fri Nov 30, 2018 9:40 am 
Post subject: Re: exec command for linux

Make absolutely certain the server can reach the path.

Run a couple really simple test scripts.

Do a print(); function on the DS string that is going to be executed. Its often not what you think it should be.


Most of us could write your code for you but I would strongly suggest you learn to do this yourself and try as much as possible to NOT GUESS. When working at a command line its far too easy to make a horrible mistake and nobody here wants to be responsible for that. My .02 icon_cool.gif
Back to top
Display posts from previous:   
Register or Login to Post    Forum Index -> Data Integrator -> DI: Designer and Job Design  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT - 5 Hours
 
Jump to:  

Index | About | FAQ | RAG | Privacy | Search |  Register |  Login 

Get community updates via Twitter:

Not endorsed by or affiliated with SAP
Powered by phpBB © phpBB Group
Generated in 0.0314 seconds using 17 queries. (SQL 0.0033 Parse 0.0009 Other 0.0272)
CCBot/2.0 (https://commoncrawl.org/faq/)
Hosted by ForumTopics.com | Terms of Service
phpBB Customizations by the phpBBDoctor.com
Shameless plug for MomentsOfLight.com Moments of Light Logo