0

I using script to apply folder permission. The script is working fine for applying permission. On the script I just need to key in the complete path of directory.

However I meet challenge where the directory name is using $. e.g. G:\$Tobe-Review

Mean while on the script:

$PATH = "G:\$Tobe-Review"

The output of course give an error.

How to counter the $ sign for the folder name?

jaypal singh
  • 74,723
  • 23
  • 102
  • 147
m.k.frenky
  • 301
  • 2
  • 4
  • 11

3 Answers3

1

Enclose your path in single-quotes.

Crutched
  • 51
  • 2
1

You could use the single-quote to prevent from interpolate the $. Difference between single and double quotes in bash might be very helpful to you to understand the reason.

Community
  • 1
  • 1
feihu
  • 1,935
  • 16
  • 24
0

The answer:

$PATH = 'G:\$Tobe-Review'
m.k.frenky
  • 301
  • 2
  • 4
  • 11