惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
Help Net Security
Help Net Security
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
C
Cisco Blogs
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
L
LINUX DO - 热门话题
Security Latest
Security Latest
A
Arctic Wolf
G
GRAHAM CLULEY
月光博客
月光博客
S
Securelist
D
Docker
J
Java Code Geeks
T
Troy Hunt's Blog
T
Tenable Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
SecWiki News
SecWiki News
S
Security @ Cisco Blogs
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
H
Heimdal Security Blog
The Hacker News
The Hacker News
博客园 - 三生石上(FineUI控件)
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
Netflix TechBlog - Medium
Vercel News
Vercel News
Forbes - Security
Forbes - Security
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
B
Blog
MongoDB | Blog
MongoDB | Blog
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
S
Secure Thoughts
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Check Point Blog
云风的 BLOG
云风的 BLOG
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Blog of Author Tim Ferriss
L
Lohrmann on Cybersecurity
F
Full Disclosure
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed

博客园 - 风歌

Sublimetext (for windows)编译运行c出现Error 2错误的解决办法 vim和tmux主题颜色不一致问题 vim安装YouCompleteMe 插件 hibernate date类型插入数据库时精度只到日期没有时间 UTL_FILE建文件失败“ORA-29280: 目录路径无效”错误 openVPN报错:All TAP-Windows adapters on this system are currently in use - 风歌 xampp连接Admin界面报错 一个换行符引发的问题 如何把excel数据导入数据库 vmware给linux虚拟机增加磁盘空间(基于lvm分区) 带统一认证的轻量级网关系统 ORA-02292主键约束问题 curl遇到longjmp causes uninitialized stack frame的处理办法 ACE6.10的安装 redhat6.3企业版安装oracle11g过程 ld编译链接时默认搜索路径 vsftpd的安装及使用问题 Fedora core 6上安装vmeare-tools VIM7.0安装
perl在命令行中打印单引号
风歌 · 2013-12-27 · via 博客园 - 风歌

Posted on 2013-12-27 13:36  风歌  阅读(3275)  评论(0)    收藏  举报

perl -e 'print "\'";'

这样写是不行的,这里直接执行会当作这命令未结束。反斜杠对符号做了转义,这样的命令解释成:

perl -e 'print ';' (双引号内一个单引号,它被当作了括住命令的单引号了)

要这样写:

perl -e 'print "'\''";

双引号内是 单引号 反斜杠 单引号 ,这样经过双引号代换后变成:

perl -e 'print \' '

参考:http://mcshell.blog.51cto.com/803455/484603