Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.4k
  • 205
  • 1.8k
  • 2.3k
added 6 characters in body
Source Link
muru
  • 77.9k
  • 16
  • 212
  • 318

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

This is how I need to call it:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Echo result:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Call result:

demos: error: unrecognized arguments: parameter

Copying and pasting echo results:

INFO:yowsup.demos.sendclient.layer:Message sent

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

This is how I need to call it:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Echo result:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Call result:

demos: error: unrecognized arguments: parameter

Copying and pasting echo results:

INFO:yowsup.demos.sendclient.layer:Message sent

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

This is how I need to call it:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Echo result:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Call result:

demos: error: unrecognized arguments: parameter

Copying and pasting echo results:

INFO:yowsup.demos.sendclient.layer:Message sent
added 373 characters in body
Source Link
user101903
user101903

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

This is how I need to call it:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Echo result:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Call result:

demos: error: unrecognized arguments: parameter

Copying and pasting echo results:

INFO:yowsup.demos.sendclient.layer:Message sent

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

I am trying to create a bash file which calls a program that expects a parameter to submitted between two double quotes.

Take a look at my file content.

#!/bin/bash
echo ./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &
./yowsup/yowsup-cli demos --s $1 \"$2\" -c yowsup/config &

The echo part prints exactly the command I need, but when I comes to execute it (next line), I am messing it up.

How can I get this fixed?

Thanks!

This is how I need to call it:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Echo result:

./yowsup/yowsup-cli demos --s 9999999999 "my parameter" -c yowsup/config

Call result:

demos: error: unrecognized arguments: parameter

Copying and pasting echo results:

INFO:yowsup.demos.sendclient.layer:Message sent
Source Link
user101903
user101903
Loading