Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2026.0.0 - English


unix_s

executes some Windows, Linux or MacOS instructions: output canceled (Silent mode) This function is obsolete. Please use host instead.

Syntax

unix_s(command)

Arguments

command

Single text containing some Windows, Linux, or MacOS instructions.

Description

unix_s(…) executes a command on the Operating system using CMD on Windows or sh on Linux and macOS without displaying any outputs.

The starting working directory and environment variables of the opened interpreter are set as described for host().

If an instruction in commands generates an error, this function throw a Scilab error.

Examples

if getos() == 'Windows' then
  unix_s("del foo");
else
  unix_s("rm -f foo");
end

See also

  • unix_g — executes some Windows, Linux or MacOS instructions: output in variables This function is obsolete. Please use host instead.
  • unix_w — executes some Windows, Linux or MacOS instructions: output in Scilab's console This function is obsolete. Please use host instead.
  • unix_x — executes some Windows, Linux or MacOS instructions: output in a dedicated window This function is obsolete. Please use host instead.
  • host — executes a Windows, Linux, or MacOS command
  • powershell — executes a command with the Windows powershell interpreter (Windows only)
  • setenv — set the value of an environment variable
  • getos — return Operating System name and version

History

VersionDescription
2026.0.0

Tagged obsolete, use [stat, _, stderr] = host(cmd) instead.

Report an issue
<< unix_g OS_commands unix_w >>

Copyright (c) 2022-2025 (Dassault Systèmes S.E.)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 16 09:02:34 CEST 2025