8/24/2023 0 Comments Hyphen vs dash![]() 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. 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. A semicolon is an alternative to having two separate sentences, or two sentences connected with a conjunction. Semicolons are used for basically two purposes: (a) To join two clauses that could each stand as an independent sentence, but which you want to tie together. For example the who command lists the users on a system. Semicolons and dashes are not interchangeable. Generally, the most confusing of these are the hyphen, en dash, and em dash. ) may use different letters to do the same thing. What's the Difference Between a Dash and Em Dash In the world of typography, a humble horizontal line can mean at least seven different things depending on its length and the context in which it gets used. On top of that, the commands for different Unix-systems (Solaris, *BSD, SysV, AIX. that the command must do something (like overwrite an existing file), even though it usually wouldn't. 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. Wikipedia uses four: the hyphen (sometimes called the hyphen-minus), the minus sign, the en dash, and the em dash. ![]() 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) They have two hypens followed by one or more words seperated by single hypens ( -version -ignore-case). 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. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |