Table of Contents
cdm.class.sh
List of all functions in alphabetic order
cdm.end()
show a waiting text after a demo
🔹 param string optional: custom text; default: "End of this demo. Press Return ..."
cdm.prompt()
Render a fake shell prompt
👉🏼 see cdm.sethost to set a different host
👉🏼 see cdm.setuser to set a different user
👉🏼 see cdm.setpath to set a fixed path to hide real path
cdm.rem()
Write a remark in the console
🟩 param string text to show
cdm.run()
Run a command: it renders a prompt, types the command and executes it.
You get the output of it and see the return code
👉🏼 see cmd.shell to run any command without the fake prompt
🟩 param string command to execute
cdm.script()
Parse a script and execute it from a generated temp file
🟩 param string path to script
🔹 param string optional: to debug set a non empty string
cdm.sethost()
Set a host name for the prompt
🟩 param string new host name; default is "tux-client"
cdm.setpath()
Set a fixed path for the prompt to hide the current location
🟩 param string new path name; default is "" (=dynamicly written current dir)
cdm.setuser()
Set a user name for the prompt
🟩 param string new user name; default is "user"
cdm.setwaittime()
Set waiting time after finishing the prompt and before command execution
🟩 param float new wait time in sec, eg 2.5; default is '' (=interactive return)
cdm.shell()
Run a command without prompt
You get the output of it
🟩 param string command to execute
cdm.timer()
Wait for N seconds and show a progress bar while waiting
Use this to show that the program is still running but needs to wait a fixed
amount of time.
🟩 param integer new wait time in sec
cdm.typer()
Randomly delayed typing of a given text
Dealy time is random between 0.0 and 0.250 sec
🟩 param string text
Generated with Bashdoc v0.7