如果代码中有制表符,会发生什么情况?
可将制表符转换成空格的选项。
避免在示例代码行的开始使用制表符。
s——空白字符,如制表符或换行符。
由逗号或制表符分隔的文本。
代码中不应该有制表符。
空白(空格或制表符)。
使用两个空格表示缩进,而且绝不使用制表符。
默认的字段分隔符是制表符。
清单11展示如何使用tr将空格转换为制表符。
d——允许我们指定其他分隔符,而不是制表符。
有时候,您可能希望将制表符替换为空格,或者相反。
Sometimes you may want to swap tabs for Spaces or vice versa.
可以使用制表符来标记缩进,但是一般推荐使用空格。
You can use tab characters to mark the indentation, but it's generally recommended that you use spaces.
设置一个单一值,它将以此为间隔设置重复的制表符。
如果断言为真,则可以用制表符(\t)替换逗号。
If the assertion is true, the comma may be replaced with a TAB (the \ t).
其中一些选项控制它输出非打印字符的方式,例如制表符和控制字符。
Some of them control the way it outputs nonprinting characters, such as tabs and control characters.
其他格式包括名称-值对格式、制表符分隔的格式以及固定宽度的格式。
Others formats include name and value pairs, tab-separated, and fixed-width formats.
回忆一下,我们前面使用tr命令将text1中的空格修改为制表符。
Remember earlier we used the tr command to change blanks in text1 to tabs.
也可处理以空格、分号、制表符、回车或任何其他可识别字符分隔的列表。
A list separated by Spaces, semicolons, tabs, carriage returns, or any other identifiable character can be processed.
除非您指定了一个不同的字段分隔符,否则将使用空格或制表符分隔字段。
Unless you specify a different field separator, fields are delimited by blanks or tabs.
但您不知道单词由什么分隔,是空格、换行符、制表符还是这些字符的组合。
But you don't know whether the words are separated by Spaces, line breaks, tabs, or some combination of these.
默认的分隔符是制表符,- f选项可以用来指定希望显示的域。
The default delimiter is the TAB, and the -f option is used to specify the desired field.
cat还可以在您查看包含如制表符这样的非打印字符的文件时起帮助作用。
Cat can also help when you are viewing files that contain non-printing character like tabs. You can reveal them with these options.
否则其他补全将不可行,因此它通过返回一个制表符来充当正常的tab键。
Otherwise, no completion was possible, so it falls back to acting like a normal TAB key, by returning a literal TAB character.
在创建text1和text2文件时,我们使用制表符创建了text2。
When we created our text1 and text2 files, we created text2 with TAB characters.
这种方法删除代码中所有不必要的字符,比如制表符(tab)、新行和空格。
Minification removes from the code all the unnecessary characters, such as tabs, newlines, and Spaces.
要通过文本文件向数据库填入数据,需要创建一个以制表符定界的文件。
To populate tables in your database from a text file, you need to create a TAB delimited file.
制表符字符是默认的分隔符,但是我们可以使用- d选项将其修改成任何其他值。
The TAB character is the default delimiter, but you can change it to anything else with the -d option.
修正混合制表符——会提示开发人员修正混合了制表符和空格的代码文件。
Fix Mixed tabs - Prompts to fix files that mix tabs and Spaces.
约定的可读性目标包括使用断行、将空格当做制表符和空白对待,以及条件语句的格式。
Conventions aimed at readability includes such things as the use of line breaks, treatment of whitespace like tabs and Spaces, and the formatting of conditional statements.
应用推荐