Author: Unknown
Subject: Local vs Absolute Paths for $0
Date: Thursday, 22 Oct 2020, 18:02:03
The staff solution seems to print absolute paths for $0, while my program prints the local path used to run the executable. I wrote my program in Python and used the sys.argv list to access arguments. The behavior is shown below. $ cd /c/cs323/Hwk3 $ ./mcBash (1)$ $0 >> /home/classes/cs323/Hwk3/mcBash (2)$ ^C $ cd ~/cs323/hwk3 $ ./mcBash (1)$ $0 >> ./mcBash (2)$ ^C $PREV INDEX NEXT