0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

環境変数を設定、削除しながら一行コマンドを打つ方法

Posted at

ちょっと必要になったのでメモ代わり

ヾ(・ω<)ノ" 三三三● ⅱⅲ コロコロ♪


------------------- ↓ 本題はここから ↓-------------------

PowerShell

# 環境変数設置
PS C:\Users\magic> $env:COMPOSE_FILE="C:\Program Files\abc"; $env:COMPOSE_FILE
C:\Program Files\abc
# 環境変数削除
PS C:\Users\magic> $env:COMPOSE_FILE=""; $env:COMPOSE_FILE

Command Prompt

# 環境変数設置
C:\Users\magic>set COMPOSE_FILE="C:\Program Files\abc" && set compose_file
COMPOSE_FILE="C:\Program Files\abc"

# 環境変数削除
C:\Users\magic>set COMPOSE_FILE= && set compose_file
COMPOSE_FILE=

Bash

dozo@dozo /m/c/U/magic> COMPOSE_FILE=/home/dozo/abc echo $COMPOSE_FILE
/home/dozo/abc
# 削除は記述しなきゃいいだけ

------------------- ↓ 後書はここから ↓-------------------

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?