Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision |
| validate_a_url [2025/01/31 00:31] – created ken | validate_a_url [2026/07/07 23:13] (current) – external edit 127.0.0.1 |
|---|
| | ====== bash function to valid a file url ====== |
| |
| <code> | <code> |
| #--- Validate the .repo file url< | #--- Validate a file url< |
| LOG_MSG="Validating the url: ${URL_TO_CHK}"< | LOG_MSG="Validating the url: ${URL_TO_CHK}"< |
| fn_write_to_log< | fn_write_to_log< |
| VALID_URL=$(grep 404 ${OUTPUT_DIR}/wget_resp.tmp)< | VALID_URL=$(grep 404 ${OUTPUT_DIR}/wget_resp.tmp)< |
| if [[ ${VALID_URL} != "" ]]; then< | if [[ ${VALID_URL} != "" ]]; then< |
| LOG_MSG="*** ERROR: ${URL_TO_CHK} does not existi, or cannot access. EXITING SCRIPT."< | LOG_MSG="*** ERROR: ${URL_TO_CHK} does not exist, or cannot access. EXITING SCRIPT."< |
| fn_write_to_log< | fn_write_to_log< |
| fn_controlled_exit< | fn_controlled_exit< |