Вопрос

I just got a mac, and since I am more used to windows cmd than bash in linux and mac, I am struggling with this. I am trying to change an output path using bash to make some apps portable. In cmd, it was something like this

Set APPDATA=%CD%/certainfolderforportablestuff

How does this work in bash? Just keep the Appdata folder name though. Thanks in advance!

Это было полезно?

Решение

APPDATA=%CD%/certainfolderforportablestuff

in bash should be

APPDATA=$PWD/certainfolderforportablestuff

And since you're just starting with bash I suggest that you place variables inside double quotes by default:

APPDATA="$PWD/certainfolderforportablestuff"
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top