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.
我想生成一个从 1 到 5 的数字列表,每一步递增 0.25,如下所示:
1.0, 1.25, 1.5, ..., 4.5, 4.75, 5.0
这可以在csh中做到吗?如果是这样,我该怎么做?
谢谢您的帮助。
您可以将seq命令用作:
seq
seq 1 0.25 5
ideone链接
要在一行中显示所有数字,您可以使用 as 的-s(separator) 选项seq:
-s
seq -s' ' 1 0.25 5
Ideone 链接