Skip to main content
added 219 characters in body
Source Link
bmike
  • 241.3k
  • 80
  • 433
  • 958

My gut feeling is you don't want to complicate things by setting a variable and you want to escape each punctuation with the \ character.

The < is going to be super problematic for bash

The next thing you might try is quoting the problematic argument string with single quotes but I've had better luck with the back slash escaping command characters in bash individually.

So if you want bash to see this:

mount -o nodev,nosuid -t smbfs //user:pass=<word@host/share /mnt/share

you need to type this:

mount -o nodev,nosuid -t smbfs //user:pass=\<word@host/share /mnt/share

My gut feeling is you don't want to complicate things by setting a variable and you want to escape each punctuation with the \ character.

The < is going to be super problematic for bash

The next thing you might try is quoting the problematic argument string with single quotes but I've had better luck with the back slash escaping command characters in bash individually.

My gut feeling is you don't want to complicate things by setting a variable and you want to escape each punctuation with the \ character.

The < is going to be super problematic for bash

The next thing you might try is quoting the problematic argument string with single quotes but I've had better luck with the back slash escaping command characters in bash individually.

So if you want bash to see this:

mount -o nodev,nosuid -t smbfs //user:pass=<word@host/share /mnt/share

you need to type this:

mount -o nodev,nosuid -t smbfs //user:pass=\<word@host/share /mnt/share
Source Link
bmike
  • 241.3k
  • 80
  • 433
  • 958

My gut feeling is you don't want to complicate things by setting a variable and you want to escape each punctuation with the \ character.

The < is going to be super problematic for bash

The next thing you might try is quoting the problematic argument string with single quotes but I've had better luck with the back slash escaping command characters in bash individually.