The Memory Bank

...for memory blanks

Site Tools


validate_a_url

This is an old revision of the document!


 #--- Validate the .repo file url<
 LOG_MSG="Validating the url: ${URL_TO_CHK}"<
 fn_write_to_log<
 wget -S --spider ${URL_TO_CHK} -o ${OUTPUT_DIR}/wget_resp.tmp<
 VALID_URL=$(grep 404 ${OUTPUT_DIR}/wget_resp.tmp)<
 if [[ ${VALID_URL} != "" ]]; then<
   LOG_MSG="*** ERROR: ${URL_TO_CHK} does not existi, or cannot access.  EXITING SCRIPT."<
   fn_write_to_log<
   fn_controlled_exit<
 else<
  LOG_MSG="[OK] ${URL_TO_CHK} is valid."<
  fn_write_to_log<
fi<
rm -r ${OUTPUT_DIR}/wget_resp.tmp<
URL_TO_CHK=""<
validate_a_url.1738283490.txt.gz · Last modified: (external edit)