Name:

bashevaluate executes a shell command and returns its output as a string

Library names:

sollya_obj_t sollya_lib_bashevaluate(sollya_obj_t, ...) sollya_obj_t sollya_lib_v_bashevaluate(sollya_obj_t, va_list)

Usage:

bashevaluate(command) : string -> string bashevaluate(command,input) : (string, string) -> string

Parameters:

Description:

Example 1:

   > bashevaluate("LANG=C date");
   Wed Feb  8 10:46:20 CET 2017

Example 2:

   > [| bashevaluate("echo Hello") |];
   [|"Hello"|]

Example 3:

   > a = bashevaluate("sed -e 's/a/e/g;'", "Hallo");
   > a;
   Hello
See also: bashexecute
Go back to the list of commands