ewanwalker/Utility_Bash_Functions
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Function: show_progress Simple bash script that displys current progress in a script, through a progress bar and displays percentage of task completed completed. Inputs: 1 - Current_Task 2 - Total_Tasks 3 - Done_Symbol 4 - Todo_Symbol Example usage: show_progress 1 5 / _ sleep 2 show_progress 2 5 / _ sleep 2 show_progress 3 5 / _ sleep 2 show_progress 4 5 / _ sleep 2 show_progress 5 5 / _ Example Outputs: Progress : [/////////////////////////////////////////////////_____________________________]60% Progress : [//////////////////////////////////////////////////////////////////////////////]100% Function: set_scroll set the region of the terminal that will scroll and were shall be static / seperate Inputs: 1 - End_Rows (How many rows to leave at the ned of the scroll region) Example usage: set_scroll 2 Example Output: (Note the spacing of the final line and the bash input) bash$ [////////////////////////////////////////////////////]100% Function: move_cursor_line move the cursor to a specific terinal row Inputs: 1 - Line_To_Move_To Example usage: move_cursor_line 1