Generated code for 'sh' and 'sh-lines' commands.
[libguestfs.git] / guestfish-actions.pod
index ee3f641..3217d92 100644 (file)
@@ -401,7 +401,9 @@ or compatible processor architecture).
 The single parameter is an argv-style list of arguments.
 The first element is the name of the program to run.
 Subsequent elements are parameters.  The list must be
-non-empty (ie. must contain a program name).
+non-empty (ie. must contain a program name).  Note that
+the command runs directly, and is I<not> invoked via
+the shell (see C<sh>).
 
 The return value is anything printed to I<stdout> by
 the command.
@@ -432,6 +434,8 @@ FTP.
 This is the same as C<command>, but splits the
 result into a list of lines.
 
+See also: C<sh-lines>
+
 Because of the message protocol, there is a transfer limit 
 of somewhere between 2MB and 4MB.  To transfer large files you should use
 FTP.
@@ -1226,6 +1230,32 @@ This displays the partition table on C<device>, in the
 human-readable output of the L<sfdisk(8)> command.  It is
 not intended to be parsed.
 
+=head2 sh
+
+ sh command
+
+This call runs a command from the guest filesystem via the
+guest's C</bin/sh>.
+
+This is like C<command>, but passes the command to:
+
+ /bin/sh -c "command"
+
+Depending on the guest's shell, this usually results in
+wildcards being expanded, shell expressions being interpolated
+and so on.
+
+All the provisos about C<command> apply to this call.
+
+=head2 sh-lines
+
+ sh-lines command
+
+This is the same as C<sh>, but splits the result
+into a list of lines.
+
+See also: C<command-lines>
+
 =head2 sleep
 
  sleep secs