| ▲ | b-kf an hour ago | |
Obviously it's not a shell script, it's still C. It's fun though and being able to freely specify an interpreter/execution path using a shebang has led me to write some useful little command line utilities in unlikely programming languages over the years. That said, not sure why changing the working directory would be the litmus test. A C program can change its own working directory just as easily as an ordinarily executed bash script?
in C you can change dir easily via `chdir()`[1]
[1] https://www.man7.org/linux/man-pages/man2/chdir.2.htmlIf you meant somehow changing the parent shell's directory an ordinary bash script doesn't do that either | ||