mv -vi -this_is_a_bad_filename this_is_a_better_filename (only command you should use if a filename starts with a hyphen. this_is_a_bad_filename), commands may confuse it with an option and try to parse it - the double-hyphen prevent this. Thus -ignore-case is used in both grep and sort.īut again, they are almost only used in commands/programs made as part of the GNU-project.įinally a double hypen is used to tell a command that the list of options are finished, and that what follows are arguments - no matter how much they may look like options. Dashes interrupt your writing to insert an interjection or pause, while parentheses gently add information to your point. For example -ignore-case, -interactive, -version, -force. Long options on the other hand, allows the same option to be used on all commands and they actually describe what the options does. This command can optionally show which users accept messages from other users to their terminal - the option for this is -w under Linux, while Solaris uses -T. For example the who command lists the users on a system. ) may use different letters to do the same thing. On top of that, the commands for different Unix-systems (Solaris, *BSD, SysV, AIX. Don't use two hyphens in place of an em dash. Use to join words and connect prefixes to stem words. Use to connect compound modifiers under specific conditions. Use in ranges of numbers and dates, in negative numbers, and as a minus sign. that the command must do something (like overwrite an existing file), even though it usually wouldn't. Use to set off or emphasize parenthetical phrases. To make the confusion complete, many commands - including mv and cp - uses -f for "force". To make it even more difficult, the command sort uses -f - for "fold case" - in the same way, to ignore upper and lower case. For example -i means "interactive" for cp, mv, ln and rm - the command will prompt before overwrite or delete. Yes, -v is often used for "verbose" - and -V is sometimes used for "version" - but there is no real consesnsus between commands. The drawback with the old one-hypen options is that there are no standard letter to do the same thing over different commands. Options with arguments uses an equal-sign to seperate option and argument ( -log-file=filename) But recently I got the video in which woman pronounces it like 'tak' (starting from 3:00 ). They have two hypens followed by one or more words seperated by single hypens ( -version -ignore-case). 18 While talking about commands for command-line interface, I sometimes need to pronounce how command should be typed, like this one: nc -l -p 1234 I used to pronounce - sign in this context as a 'hyphen', or 'dash', or probably 'minus'. Two hyphen is mostly used - and is the prefered way of giving options - for programs/commands on GNU-systems - ie. Some options are followed by an argument ( -ofilename -o filename). They have one hypen followed by a single letter (or sometimes number) ( -a -i -T). One hyphen is the way options to a command traditionally has been given to Unix-commands.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |