azibom
azibom

Reputation: 1944

use single quote in command line for the password

I have a .php file which name is console.php and I want to set password from command like with this script all things is ok and I use it like this

php console.php user password
// f.e.
php console.php admin 1234

But when I want to use the a strong password which contain a single quote f.e. 123'456 it does not work and go to the next line like this

azibom@azibom:~$ php console.php admin 123'456
> 

Is there any solution for it?

Upvotes: 0

Views: 1275

Answers (1)

user1934428
user1934428

Reputation: 22227

You can escape characters which have special meaning to the shell: 123\'456.

Upvotes: 1

Related Questions