重击空格 [英] Spaces with bash

查看:41
本文介绍了重击空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试导出带有空格的文件夹...但是我不知道如何...

I'm trying to make an export of a folder with spaces... but I did'nt find out how...

:~> export PATH="/home/solo/VirtualBox\ VMs/"
:~> cd $PATH
bash: cd: /home/solo/VirtualBox\: No existe el fichero o el directorio

我认为只要加上"\"就可以解决,但没有解决.

I thought that with a "\" I could solve but did not.

推荐答案

您已经用引号将它转义了;不需要反斜杠,只是不要每次都忘记引号.但是FFS,不要使用 $ PATH ;表示环境变量重要.

You've already escaped it with the quotes; there's no need for a backslash, just don't forget the quotes each time. But FFS, don't use $PATH; that env var is important.

这篇关于重击空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆