SecureTech
SecureTech

Reputation: 259

How does read from string in bash works?

I came across a command like :-

/bin/bash -c LOCALHOST:/path/to/script --argument

and it gives a error like /path/to/script doesn't exist,but /path/to/script exists.

I want to know how -c option works.

Upvotes: 0

Views: 44

Answers (1)

hgiesel
hgiesel

Reputation: 5658

You have to do it like this

$ /bin/bash -c '/path/to/script --argument'

Inside these single quotes is basically the line you would write before you hit Enter.

Upvotes: 2

Related Questions