Replace sed by cut to get URL

This commit is contained in:
Jeremy Gardais 2020-12-02 22:44:42 +01:00
parent 689e53ad7c
commit 3a002f1b8e
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 2 deletions

4
qb
View File

@ -337,14 +337,14 @@ Try to manage ${RED}$(cat "${choice_temp_file}")${COLOR_DEBUG}."
case "${local_content}" in case "${local_content}" in
bb*http* ) ## Classic bookmark bb*http* ) ## Classic bookmark
url=$(printf "%s" "${local_content}" | sed -e "s;bb \(http.*\) .*;\1;") url=$(printf "%s" "${local_content}" | cut -d" " -f2)
return_get_url="0" return_get_url="0"
debug_message "get_url \ debug_message "get_url \
URL from classic bookmark ${RED}${url}${COLOR_DEBUG}." URL from classic bookmark ${RED}${url}${COLOR_DEBUG}."
goto_url goto_url
;; ;;
qq*http* ) ## Quickmark qq*http* ) ## Quickmark
url=$(printf "%s" "${local_content}" | sed -e "s;qq .*\(http.*\);\1;") url=$(printf "%s" "${local_content}" | cut -d" " -f3)
return_get_url="0" return_get_url="0"
debug_message "get_url \ debug_message "get_url \
URL from quickmark ${RED}${url}${COLOR_DEBUG}." URL from quickmark ${RED}${url}${COLOR_DEBUG}."