2

Is there any reason that the below command does this and is there any way to stop it appending it? Code

Run And Return Rc cat ${files_to_process_path}${FILE}

Outputs...

16:47:26.424    TRACE   Arguments: [ 'cat /var/www/sponsor1_integration/to_process/study-6313_LONGBOAT_20170112_12:37.csv' ]    
16:47:26.428    INFO    Running command 'cat /var/www/sponsor1_integration/to_process/study-6313_LONGBOAT_20170112_12:37.csv 2>&1'. 

16:47:26.431 TRACE Return: 0

user3303266
  • 339
  • 1
  • 6
  • 18

1 Answers1

3

It is appended, so any error output of a shell command is propagated back to your keywords - i.e. not to hide it. The construct 2>&1 does just that - redirects stder to stdout.

As for removing it - no, it's embedded too deep in the OperatingSystem library, with no control to not use it. If you really don't want it, you should create your own library for that. Though, it does not do any harm, on the contrary, its benefit is you'll see any errors from the commands.

Todor Minakov
  • 14,867
  • 2
  • 44
  • 49