Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要做的是从文本文件中读取一行并在每一行的末尾附加 .in 。
这是我的代码。
while read line; do echo "${line}".in done < sets.txt
sets.txt 的内容是:
set1 set2 set3
因此这段代码应该打印
set1.in set2.in set3.in
但是这段代码产生
.in .in .in
你能帮我解决这个问题吗?谢谢!:)
试试怎么样cat sets.txt | while read line?这样更标准。
cat sets.txt | while read line
你的代码对我有用。(看起来它也适用于其他人)。很难说从这里有什么问题。但是,另一种方法可能是使用awk:
awk
awk '{printf "%s.in\n", $0}' input_file > output_file
(不要使用相同的文件进行输入和输出!这会截断输入文件)
许多网页设计师强烈反对使用表格来设计布局,因为他们认为表格用于表格数据而不是用于保存对象。
我觉得表格很容易理解,易于使用,结构良好。我不喜欢 Div 因为它真的很难使用也很难理解。
但是在 Gwt 上下文中,我听说有 12K 声誉的人建议使用<Table>insideHTMLPanel来控制布局,因为它非常易
<Table>
HTMLPanel