本篇内容主要讲解“Linux上怎么直接使用urlencode和urldecode命令”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Linux上怎么直接使用urlencode和urldecode命令”吧!
CentOS安装:
yum install gridsite-clients
然后直接使用:
[root@local ~]# urlencode 'https://www.baidu.com/'https%3A%2F%2Fwww.baidu.com%2F
关于命令的详细使用方法:
NAME urlencode - convert strings to or from URL-encoded formSYNOPSIS urlencode [-m|-d] string [string ...]DESCRIPTION urlencode encodes strings according to RFC 1738. That is, characters A-Z a-z 0-9 . _ and - are passed through unmodified, but all other characters are represented as %HH, where HH is their two-digit upper-case hexadecimal ASCII representation. For example, the URL http://www.gridpp.ac.uk/ becomes http%3A%2F%2Fwww.gridpp.ac.uk%2F urlencode converts each character in all the strings given on the command line. If multiple strings are given, they are concatenated with separating spaces before conversion.OPTIONS -m Instead of full conversion, do GridSite "mild URL encoding" in which A-Z a-z 0-9 . = - _ @ and / are passed through unmodi‐ fied. This results in slightly more human-readable strings but the application must be prepared to create or simulate the directories implied by any slashes. -d Do URL-decoding rather than encoding, according to RFC 1738. %HH and %hh strings are converted and other characters are passed through unmodified, with the exception that + is converted to space.
到此,相信大家对“Linux上怎么直接使用urlencode和urldecode命令”有了更深的了解,不妨来实际操作一番吧!这里是编程网网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!