{"id":22018161,"url":"https://github.com/rvflash/bash-packages","last_synced_at":"2026-04-20T10:06:12.012Z","repository":{"id":146847973,"uuid":"50098137","full_name":"rvflash/bash-packages","owner":"rvflash","description":"Various packages developed to help development in bash","archived":false,"fork":false,"pushed_at":"2016-09-08T12:03:58.000Z","size":118,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"stable","last_synced_at":"2025-03-23T09:35:14.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rvflash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-21T09:52:27.000Z","updated_at":"2018-02-14T07:49:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"492028a3-3a74-42ce-9200-90c6772f236a","html_url":"https://github.com/rvflash/bash-packages","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/rvflash/bash-packages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fbash-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fbash-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fbash-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fbash-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rvflash","download_url":"https://codeload.github.com/rvflash/bash-packages/tar.gz/refs/heads/stable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rvflash%2Fbash-packages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32042323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T05:10:14.963Z","updated_at":"2026-04-20T10:06:12.007Z","avatar_url":"https://github.com/rvflash.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bash-packages\n\n## Package array\n\n* Function arrayCombine ( array keys, array values ) array `?\u003e0 If the number of elements for each array isn't equal`\n* Function arrayDiff ( array haystack1, array haystack2 ) array `?=0`\n* Function arrayFillKeys ( array keys, string value) array `?=0`\n* Function arrayKeyExists ( string needle, array haystack1) void  `?=0 if needle exists as key in array, 1 otherwise`\n* Function arrayMerge ( array haystack1, array haystack2 ) array `?=0`\n* Function arraySearch ( string needle, array haystack ) mixed `?=0 if needle is found, 1 otherwise`\n* Function arrayToString ( string arrayDeclaration ) string `?=0`\n* Function arrayUnique ( string arrayDeclaration ) array `?=0`\n* Function count ( mixed value ) int `?=0`\n* Function inArray ( string needle, array haystack ) void `?=0 if needle is found, 1 otherwise`\n\n## Package database/mysql\n\n\u003e The mysql command is mandatory for this package\n\u003e The mysqldump command is mandatory only for the method named mysqlDump\n\n* Function mysqlAffectedRows ( int resultLink ) int `?=0`\n* Function mysqlClose ( int databaseLink ) void `?\u003e0 If database link does not exist`\n* Function mysqlConnect ( string host, string user, string pass, string database [ , int connectTimeout 0, int cached 0 ] ) int `?=2 If mysql command does not exist, 1 in case of error, 0 otherwise`\n* Function mysqlDump ( int databaseLink [ , string table, string options ] ) string `?=2 If mysqldump command does not exist, 1 in case of error, 0 otherwise`\n* Function mysqlEscapeString ( string str ) string `?=0`\n* Function mysqlError ( int databaseLink ) string `?=0`\n* Function mysqlLastError ( int databaseLink ) string `?=0` @deprecated\n* Function mysqlLoad ( int databaseLink, string filePath ) void `?=2 If mysql command does not exist, 1 in case of error, 0 otherwise`\n* Function mysqlFetchAll ( int databaseLink, string query [ , string options[ \"raw\", \"num\", \"assoc\" ] \"num\" ] ) string `?\u003e0 In case of error`\n* Function mysqlFetchAssoc ( int databaseLink, string query ) string `?\u003e0 In case of error`\n* Function mysqlFetchArray ( int databaseLink, string query ) string `?\u003e0 In case of error`\n* Function mysqlFetchRaw ( int databaseLink, string query ) string `?\u003e0 In case of error`\n* Function mysqlNumRows ( int resultLink ) int `?=0`\n* Function mysqlOption ( int databaseLink, string name, mixed value ) void `?\u003e0 In case of error`\n* Function mysqlQuery ( int databaseLink, string query ) int `?\u003e0 In case of error`\n* Function mysqlWarningCount( int resultLink ) int `?\u003e0 In case of error`\n\n\n## Package encoding/yaml\n\n* Function yamlDecode ( string str ) array `?\u003e0 In case of error`\n* Function yamlEncode ( array str ) string `?\u003e0 In case of error`\n* Function yamlFileDecode ( string filePath ) array `?\u003e0 In case of error`\n* Function yamlFileEncode ( string str, string filePath ) void `?\u003e0 In case of error`\n\n\n## Package encoding/base64\n\n\u003e The base64 command is mandatory for this package\n\n* Function base64Decode ( string str ) string `?=2 If base64 method does not exist, 1 in case of error, 0 otherwise`\n* Function base64Encode ( string str ) string `?=2 If base64 method does not exist, 1 in case of error, 0 otherwise`\n\n\n## Package file\n\n* Function import ( ...string path ) void `?\u003e0 If one of the list of file path does not exist`\n* Function include ( string path [ , int onceMode 0 ] ) void `?\u003e0 If file does not exist`\n* Function includeOnce ( string path ) void `?\u003e0 If file does not exist`\n* Function physicalDirname ( string path ) string `?\u003e0 If directory does not exist`\n* Function realpath ( string path ) string `?\u003e0 If file does not exist`\n* Function resolvePath ( [ string path, string sourceDir ] ) string  `?=0`\n* Function scanDirectory ( string path [ , int withFile 0, int completePath 0 ] ) string `?\u003e0 If directory does not exist`\n* Function userHome ( ) string `?\u003e0 In case of error`\n\n\n## Package log\n\nBy default, log will not be prefixed by the date and time or level. You can override it by using appropriate methods.\nYou can also add your own prefix by using the method named `logUsePrefix`.\n\n* Function logIsMuted ( ) void `?=0 if log methods are disabled, 1 otherwise`\n* Function logMute ( int enable ) void `?=0`\n* Function logPrefix ( ) string `?=0`\n* Function logUsePrefix ( string prefix ) void `?=0`\n* Function logUseDateTime ( int enable ) void `?=0`\n* Function logUseLevel ( int enable ) void `?=0`\n* Function logWithDateTime ( ) void `?=0 if each log are prefixed by datetime, 1 otherwise`\n* Function logWithLevel ( ) void `?=0 if each log are prefixed by level, 1 otherwise`\n\n## Package log/print\n\n\u003e Print on default output\n\n* Function pInfo ( string str ) string `?=0`\n* Function pInfoF ( string formatstr [, ...string args ] ) string `?\u003e0 If the print datas does not match with the formatstring`\n* Function pWarn ( string str ) string `?=0`\n* Function pWarnF ( string formatstr [, ...string args ] ) string `?\u003e0 If the print datas does not match with the formatstring`\n* Function pError ( string str ) string `?=0`\n* Function pErrorF ( string formatstr [, ...string args ] ) string `?\u003e0 If the print datas does not match with the formatstring`\n* Function pFatal ( string str ) string `#=1`\n* Function pFatalF ( string formatstr [, ...string args ] ) string `#=1`\n\n## Package log/file\n\n\u003e Write into a file\n\n* Function wInfo ( string filepath, string str ) void `?\u003e0 In case of error for writing into file`\n* Function wInfoF ( string filepath, string formatstr [ , ...string args ] ) void `?\u003e0 In case of error for writing into file`\n* Function wWarn ( string filepath, string str ) void `?\u003e0 In case of error for writing into file`\n* Function wWarnF ( string filepath, string formatstr [ , ...string args ] ) void `?\u003e0 In case of error for writing into file`\n* Function wError ( string filepath, string str ) void `?\u003e0 In case of error for writing into file`\n* Function wErrorF ( string filepath, string formatstr [ , ...string args ] ) void `?\u003e0 In case of error for writing into file`\n* Function wFatal ( string filepath, string str ) void `#\u003e0 In case of error for writing into file`\n* Function wFatalF ( string filepath, string formatstr [ , ...string args ] ) void `?\u003e0 In case of error for writing into file`\n\n\n## Package math\n\n\u003e The bc command is not mandatory for this package, but used if exists\n\n* Function add ( mixed var1, mixed var2, int scale ) float|int `?\u003e0 In case of error`\n* Function ceil ( float value ) int `?\u003e0 In case of error`\n* Function decimal ( mixed value ) int `?\u003e0 In case of error`\n* Function divide ( mixed var1, mixed var2, int scale ) float|int `?\u003e0 In case of error`\n* Function floor ( float value ) int `?\u003e0 If value is not a number`\n* Function int ( mixed value ) int `?\u003e0 In case of error`\n* Function isFloat ( mixed value ) void `?=0 if it is a float value, 1 otherwise`\n* Function isInt ( mixed value ) void `?=0 if it is a integer value, 1 otherwise`\n* Function isNumeric ( mixed value ) void `?=0 if it is a numeric value, 1 otherwise`\n* Function isFloatEqualOrGreaterThan ( float var1, mixed var2 ) void `?=0 if var 1 is lower, 1 otherwise`\n* Function isFloatEqualOrLowerThan ( float var1, mixed var2 ) void `?=0 if var 1 is lower, 1 otherwise`\n* Function isFloatGreaterThan ( float var1, mixed var2 ) void `?=0 if var 1 is lower, 1 otherwise`\n* Function isFloatLowerThan ( float var1, mixed var2 ) void `?=0 if var 1 is greater, 1 otherwise`\n* Function math ( string operator, mixed var1, mixed var2, int scale ) float|int `?\u003e0 In case of error`\n* Function modulo ( int var1, int var2, int scale ) int `?\u003e0 In case of error`\n* Function multiply ( mixed var1, mixed var2, int scale ) float|int `?\u003e0 In case of error`\n* Function numericType ( mixed Str ) string[ \"integer\", \"float\", \"unknown\" ] `?=0`\n* Function rand ( ) int `?=0`\n* Function round ( float value [, int scale] ) float|int `?=0`\n* Function subtract ( mixed var1, mixed var2, int scale ) float|int `?\u003e0 In case of error`\n\n\n## Package net\n\n* Function parseUrl ( string url ) array `?\u003e0 If Url is empty or invalid`\n\n\n## Package strings\n\n* Function checksum ( string str ) int `?\u003e0 In case of error`\n* Function isEmpty ( string str ) `?=0 if not empty, 1 if empty`\n* Function printLeftPadding ( string str, int padLength [ , string padChar ] ) string `?=0`\n* Function printRightPadding ( string str, int padLength [ , string padChar ] ) string `?=0`\n* Function toLower ( string str ) string `?=0`\n* Function toUpper ( string str ) string `?=0`\n* Function trim ( string str [ , string charToMask ] ) string `?=0`\n\n\n## Package term\n\n* Function confirm ( string message [ , string extendedMessage ] ) void `?=0 for yes, 1 for no`\n* Function dialog ( string message [ , int mandatory 1, string mandatoryMessage ] ) string `?=0`\n* Function progressBar ( string name, int step, int max, [ , string error \"An error occured\", int width 20, string charEmpty -, string charFilled + ] ) string `?\u003e0 In case of error`\n* Function windowSize ( [ string type ] ) int | array `?\u003e0 If stty size method returns in error`\n\n\n## Package testing\n\n* Function bashUnit ( string name, string expected, string received ) string `?\u003e0 If one of the three parameters are empty`\n* Function launchAllTests ( string directory ) string `?=0`\n\n\n## Package time\n\n* Function timestamp ( ) int `?\u003e0 If date method does not exists`\n* Function timeTodo ( string command ) array `?\u003e0 In case of error`\n* Function userTimeTodo ( string command ) float `?\u003e0 In case of error`\n* Function isUserTimeTodoExceeded ( string command, float duration ) void `?=0 if time not exceeds, 1 otherwise`\n* Function utcDateTimeFromTimestamp ( int timestamp ) string `?\u003e0 In case of error`\n* Function timestampFromUtcDateTime ( string utcDatetime ) int `?\u003e0 In case of error`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fbash-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frvflash%2Fbash-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frvflash%2Fbash-packages/lists"}