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");
   Thu Sep 20 12:34:53 CEST 2018

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