相当于 $export 的 Windows [英] Windows equivalent of $export

查看:35
本文介绍了相当于 $export 的 Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照一些说明使用命令行创建目录.指令是:

I am trying to follow some instructions for creating a directory using the command line. The instructions are:

$ export PROJ_HOME=$HOME/proj/111
$ export PROJECT_BASEDIR=PROJ_HOME/exercises/ex1
$ mkdir -p $PROJ_HOME

这些是windows命令吗?是否有 Windows 等效项?

Are these windows commands? Are there windows equivalents?

推荐答案

要将 *nix 样式的命令脚本转换为 windows/命令批处理样式,它会像这样:

To translate your *nix style command script to windows/command batch style it would go like this:

SET PROJ_HOME=%USERPROFILE%/proj/111
SET PROJECT_BASEDIR=%PROJ_HOME%/exercises/ex1
mkdir "%PROJ_HOME%"

Windows 上的 mkdir 没有 -p 参数:来自 MKDIR/?帮助:

mkdir on windows doens't have a -p parameter : from the MKDIR /? help:

MKDIR 根据需要在路径中创建任何中间目录.

MKDIR creates any intermediate directories in the path, if needed.

这基本上是 *nix 上的 mkdir -p(或纯粹主义者的 --parents)所做的,如 摘自手册

which basically is what mkdir -p (or --parents for purists) on *nix does, as taken from the man guide

这篇关于相当于 $export 的 Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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