0

I have a set of commands

php /home/forge/mysite.com/artisan products:exportdiff --interval="daily"
php /home/forge/mysite.com/artisan products:exportdiff --interval="daily active"
php /home/forge/mysite.com/artisan images:exportdiff --interval="daily"
php /home/forge/mysite.com/artisan publications:exportdiff  --interval="daily"

When I paste them into my Terminal, all of them excecuted one-by-one except the last one. I even tried adding ; at the end, but it behave the same.

php /home/forge/mysite.com/artisan products:exportdiff --interval="daily";
php /home/forge/mysite.com/artisan products:exportdiff --interval="daily active";
php /home/forge/mysite.com/artisan images:exportdiff --interval="daily";
php /home/forge/mysite.com/artisan publications:exportdiff  --interval="daily";

I also tried

php /home/forge/mysite.com/artisan products:exportdiff --interval="daily" &&
php /home/forge/mysite.com/artisan products:exportdiff --interval="daily active" &&
php /home/forge/mysite.com/artisan images:exportdiff --interval="daily" &&
php /home/forge/mysite.com/artisan publications:exportdiff  --interval="daily"

I got

php /home/forge/mysite.com/artisan products:exportdiff --interval="daily" &&
> php /home/forge/mysite.com/artisan products:exportdiff --interval="daily active" &&
> php /home/forge/mysite.com/artisan images:exportdiff --interval="daily" &&
> php /home/forge/mysite.com/artisan publications:exportdiff  --interval="daily"    

Can someone please teach me how to prevent my last line from not executing ?

2
  • && --> && \ ? Commented Dec 16, 2016 at 21:55
  • Sounds like an issue with that third or fourth php command. Commented Dec 17, 2016 at 13:56

1 Answer 1

1

I am going to go out on a limb here and suggest you to check if your code has some invisible "funny" characters on it. You can check that with vi or vim, by using :set list.

Alternatively, delete all visible spaces (and also end of the lines), and add them again on a "nix" environment, or even better, retype all the commands in a "nix" environment and see if that works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.