I don't want to show OS-COMMAND output...

nacho

New Member
Hi everyone,

I have a problem with the data output from a OS-COMMAND statement. I don't want to show the output of this commands, because that output is printed out to the report that the application being executed return.

The commands are:
Code:
os-command silent value("find /home/example/ -type f -size 0 | xargs rm ").
and
Code:
os-command silent value("sh " + script-path + "ftp-up.sh " + file-name + " " + file-path).

The report is printed very frequently, so the extra space used by the footer that is been printed make the report more "paper-expensive".

Anyone has been on a similar situation?

I read the OS-COMMAND documentation, but can't find anything useful there to solve this issue. At least, I didn't see any.

Thanks for your consideration,
 
Redirect output of unix command to /dev/null

Code:
os-command silent value("find /home/example/ -type f -size 0 | xargs rm >/dev/null 2>/dev/null").
Also you should consider to call find, xargs, rm with absolute paths to avoid security risk (someone could place program named find in path before /usr/bin/find).
 
Works as expected, thanks a lot!

You are right about the security risk, but only system's department people has access to the server, so it's not that bad. Thanks anyway for the advise.

Redirect output of unix command to /dev/null

Code:
os-command silent value("find /home/example/ -type f -size 0 | xargs rm >/dev/null 2>/dev/null").
Also you should consider to call find, xargs, rm with absolute paths to avoid security risk (someone could place program named find in path before /usr/bin/find).
 
Back
Top