Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arguments with special characters. #622

Open
foxsam21 opened this issue Feb 5, 2023 · 1 comment
Open

arguments with special characters. #622

foxsam21 opened this issue Feb 5, 2023 · 1 comment
Labels

Comments

@foxsam21
Copy link

foxsam21 commented Feb 5, 2023

I would like to call a command that has the & character and also I need an argument with " in it. It seems that anything I tried is not working. In bash I can just call the whole thing in " and it works. I am trying to download a snapshot from an IP camera. Here is what I have (I use my actual user and camera IP in the real file):

- id: snapshot
  execute-command: "wget"
  command-working-directory: ""
  pass-arguments-to-command:
    - source: string
      name: "http://CAM/cgi-bin/api.cgi?cmd=Snap&channel=0&user=my_user"
    - source: string
      name: -O "/home/my_user/Desktop/snapshot $(date).jpg"

@adelorenzo-portainer
Copy link

try using /home/my_user/Desktop/snapshot%20$(date).jpg

check this website for more special character encoding: HTML URL Encoding Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants