File: bashexecute.tex

package info (click to toggle)
sollya 7.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 13,864 kB
  • sloc: ansic: 117,441; yacc: 8,822; lex: 2,419; makefile: 870; cpp: 76
file content (30 lines) | stat: -rw-r--r-- 1,288 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
\subsection{bashexecute}
\label{labbashexecute}
\noindent Name: \textbf{bashexecute}\\
\phantom{aaa}executes a shell command.\\[0.2cm]
\noindent Library name:\\
\verb|   void sollya_lib_bashexecute(sollya_obj_t)|\\[0.2cm]
\noindent Usage: 
\begin{center}
\textbf{bashexecute}(\emph{command}) : \textsf{string} $\rightarrow$ \textsf{void}\\
\end{center}
Parameters: 
\begin{itemize}
\item \emph{command} is a command to be interpreted by the shell.
\end{itemize}
\noindent Description: \begin{itemize}

\item \textbf{bashexecute}(\emph{command}) lets the shell interpret \emph{command}. It is useful to execute
   some external code within \sollya.

\item \textbf{bashexecute} does not return anything. It just executes its argument. However, if
   \emph{command} produces an output in a file, this result can be imported in \sollya
   with help of commands like \textbf{execute}, \textbf{readfile} and \textbf{parse}.
\end{itemize}
\noindent Example 1: 
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> bashexecute("LANG=C date");
Thu Sep 20 12:14:39 CEST 2018
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{execute} (\ref{labexecute}), \textbf{readfile} (\ref{labreadfile}), \textbf{parse} (\ref{labparse}), \textbf{bashevaluate} (\ref{labbashevaluate})