Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with the method of urldecode in Bash

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "how to deal with the method of urldecode in Bash". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to deal with the method of urldecode in Bash".

Problem description

This note will record: in Bash, the method of urldecode, and related problem handling.

Solution

This code is copied from Stack Overflow.

Function urldecode () {: "${* / + /}"; echo-e "${_ / /% /\\ x}";} function urldecode () {local I = "${* / + /}"; echo-e "${icontrol% /\\ x}";}

The first one is so strangely written that it contains all kinds of Bash knowledge:

1): to prevent "${* / + /}" from being executed as a command

2) $_ represents the last parameter of the previous command, that is, the parsing result of "${* / + /}"

3) $* indicates all the parameters of the incoming command

4) ${pUnip _ blank /} means to replace the + of the variable p with spaces, while ${pAccord _ blank /} means to replace all the + of the variable p with spaces

Thank you for your reading, the above is the content of "how to deal with the method of urldecode in Bash". After the study of this article, I believe you have a deeper understanding of how to deal with the method of urldecode in Bash, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report