user788171
user788171

Reputation: 17553

bash variable inside quotes

I want to run the following command

ssh [email protected] "cd /home/data/ ; chmod o+rx directory_$DATE"

$DATE is a bash variable. Is there a way to get it interpreted as a variable?

Upvotes: 1

Views: 509

Answers (1)

Stephen Niedzielski
Stephen Niedzielski

Reputation: 2637

ssh [email protected] "cd /home/data/ ; chmod o+rx directory_\$DATE"

Upvotes: 4

Related Questions