2

I'm trying to understand the following shell script:

/usr/local/bin/uncrustify -q -c ~/objc.cfg -l oc

But I don't know what some of the parts say. This part

/usr/local/bin/uncrustify

says go to the bin directory and run the program uncrustify with two parameters -q and -c.

This part

~/objc.cfg -l oc

Says look in the home directory for the file objc.cfg and pass it in as a parameter too. Am I right?

lampShade
  • 489

1 Answers1

2

That's not a script but simply a command. -q, -c, ~/objc.cfg, -l and oc are all parameters of /usr/local/bin/uncrustify. For its semantic take a look at man uncrustify. Also /usr/local/bin/ is not needed as it's likely to be in your $PATH environment variable, so:

uncrustify -q -c ~/objc.cfg -l oc

behaves the same.


From man uncrustify:

  • -q : Quiet mode - no output on stderr;

  • -c ~/objc.cfg : Use the config file ~/objc.cfg;

  • -l oc : Language override: OC.

cYrus
  • 21,787