I really need to be able to have a .sh file ran from swift! I looked into t and for some reason people want me to run the shell program in the swift file but it doesn't end up working. I'm trying to run one command, really. The shell command does need argument which is going to be passed into from the app, though. The command I'm trying to run is:
chmod a-x /Applications/the input here
I also must be able to take the users input to put the password. How would I input the password?
EDIT
I have already tried:
import Foundation
let task = NSTask();
task.launchPath = "/bin/chmod"
task.arguments = ["a-x /Applications/application.app"]
task.launch()
Does anyone have any tips?