Linux上怎么直接使用urlencode和urldecode命令

发布时间:2021-08-27 15:28:45 作者:chen
来源:亿速云 阅读:527

本篇内容主要讲解“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 form
SYNOPSIS
       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命令”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

推荐阅读:
  1. php中urldecode()和urlencode()和stripslashes() 的作用
  2. 再说php urlencode urldecode

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

linux

上一篇:postgresql高可用集群的安装步骤

下一篇:如何找到上锁的SQL语句

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》