How to use ! (exclamation mark) in git ftp command line

While using the brilliant git ftp just now, we came across a problem with an FTP password that had an exclamation mark in, so we were trying to run e.g.:

git ftp push --user username --passwd abcd!defg ftp://foo.com/bar

which was returning:

-bash: !defg": event not found

because the exclamation mark character is reserved for running history commands

The solution is to enclose the password in single character quotes i.e.:

git ftp push --user username --passwd 'abcd!defg' ftp://foo.com/bar

Source: http://unix.stackexchange.com/questions/33339/cant-use-exclamation-mark-in-bash



About Phil Smithson

Ultrarunner & CTO. Passions include Mobile app development, Scrum, Kanban, Wordpress and Symfony.

Leave a Reply

Your email address will not be published. Required fields are marked *


*