I need to set a blank, empty argument (like "") in an NSTask, and I'm not sure how to do this.
I'm trying to do this:
$ dscl . create /users/test blah "" // Create a netinfo property with no value
I don't know how to set the "" in my NSTask arguments. NSTask is not supposed to work with single or double quotes you have to type in the command line. I've tried all sorts of things. I've tried putting an empty NSString.
[dscl_13 setArguments:[NSArray arrayWithObjects:@".", @"create", @"/users/test", @"blah", empty_string, nil]];
I've tried just putting nothing between quotes:
[dscl_13 setArguments:[NSArray arrayWithObjects:@".", @"create", @"/users/test", @"blah", @"", nil]];
And nothing works. I get errors when I run the program. What can I put in there to make it a blank argument in this case? |