SuperCard Shell Essentials

 

switch

Page history last edited by DCS 3 yrs ago

Command Switches

 

Switches define optional behaviors

Switch format and syntax rules are command specific.

Commands not rooted in Unix are frequently atypical.

A switch begins with a single hyphen followed by a single alpha character or digit

OR

1 to 2 hyphens followed by a word.

 

Switches are case sensitive


Depending on the command, and the switch, switches may be grouped.

screencapture -ciW

'c' forces clipboard mode

'i' enables interactive mode

'W' enables window selection mode.

 

The order in which switches are grouped is not important.

screencapture -Wic

 

Switches may also be stated as separate parameters.

screencapture -c -i -W

 

A switch may take an argument

 

screencapture -ciW -t'jpeg'

or

screencapture -ciW -tjpeg

The -t switch defines the image format as jpeg rather than the default png.

 

 

A switch may take an argument stated as a parameter.

sort -su -t ',' -nr -k 2,4

The -t switch allows specification of an alternate column delimiter.

The parameter that follows defines comma as the column delimiter rather than tab.

The -k switch enables one-indexed column numbering.

The parameter that follows indicates sort keys are to span columns 2 through 3. (3 is not a typo).

 

Word switches

sort --help

Comments (0)

You don't have permission to comment on this page.