• Increase font size
  • Default font size
  • Decrease font size
Home Software SysFunc Sysfunc Reference Guide - Miscellaneous

Sysfunc Reference Guide - Miscellaneous

E-mail Print
Read : 3,389 times
(0 votes, average 0 out of 5)
Article Index
Sysfunc Reference Guide
Configuration parameters
System database
Disk management
Error handling
File manipulation
Filesystems
IP V4 addresses
Kernel
Logical volume manager
Miscellaneous
Message display
User interaction
Network
OS
File backup
Software packages
Services
Time and date
Temporary file management
Users and groups
Vmware-specific
Function index
All Pages

cleanup

Cleanup at exit

This function discards every allocated resources (tmp files,...)

Arguments

None

Returns

Always 0

Displays

nothing

exec_url

Retrieves executable data through an URL and executes it.

Supports any URL accepted by wget.

By default, the 'wget' command is used. If the $WGET environment variable is set, it is used instead (use, for instance, to specify a proxy or an alternate configuration file).

Arguments

$1 Url

Returns

the return code of the executed program

Displays

data displayed by the executed program

finish

Finish execution

This function discards every allocated resources (tmp files,...)

Arguments

$1Ooptional. Exit code. Default: 0

Returns

Never returns. Exits from program.

Displays

nothing

func_is_defined

Check if a shell function is defined

Arguments

$1Function name

Returns

0 if function is defined, 1 if not

Displays

Nothing

help

Display help

Arguments

None

Returns

No return

Displays

Help message

loaded

Checks if the library is already loaded

Of course, if it can run, the library is loaded. So, it always returns 0.

Allows to support the 'official' way to load sysfunc :

sf_loaded 2>/dev/null || . sysfunc.sh

Arguments

None

Returns

Always 0

Displays

Nothing

txt_cleanup

Uncomment and cleanup input stream

- changes tabs to spaces, - changes multiple blanks to one space, - removes leading and trailing blanks, - removes comments (starting with '#'), - removes blank lines

Arguments

$1Optional. File to read from. If not set, read from stdin

Returns

Always 0

Displays

the cleaned stream

version

Displays library version

Arguments

None

Returns

Always 0

Displays

Library version (string)

 

Please login or register to add a comment