Hey guys I'm trying to integrate some PY into my shell script and running across the following error, I though quote should have quoted my variable but it looks like it's not doing what I expected, can someone help me troubleshoot this?
#!/bin/bash
host='user@localhost'
path='/home/user/file'
python -c "return subprocess.call(['ssh', '$host', 'test -e ' + pipes.quote($path)]) == 0"
File "<string>", line 1
return subprocess.call(['ssh', "user@localhost", 'test -e ' + pipes.quote(/home/jdaniel/sent)]) == 0
^
SyntaxError: invalid syntax