I am trying to pass a path to a Python script as an argument using sys.argv[x]. However the passing of said path from Bash to Python seems to convert it to a different path. Why is that?
Code:
#!/bin/sh
path='/var/log'
echo "$path"
python script.py "$path"
#!/usr/bin/env python3
import sys
logPath = sys.argv[1]
print(logPath)
Output:
/var/log/
C:/Program Files/Git/var/log/