在我的一个 bash 脚本中,我通过重复使用echo输出重定向来附加到文件来创建文件。然而,生成的文件没有正确命名,但总是^M在末尾附加一个不可打印的字符。有谁知道我做错了什么?下面的简单脚本演示了这个问题:
#!/bin/bash
# Should create 'concat.txt' instead creates 'concat.txt^M'
outfile="concat.txt"
echo "'"$outfile"'"
for item in "Able" "Baker" "Charlie"; do
echo $item >> $outfile
done
Run Code Online (Sandbox Code Playgroud)
系统:Ubuntu 9.04 (x64)
有没有办法从 Windows 资源管理器上下文菜单中调出 Windows 控制台(用于当前目录)?我真的很喜欢 Nautilus(在 Linux 上)中的这个功能,我想知道 Windows 中是否有并行功能。
编辑: 我对 Windows 7 和 Windows XP 特别感兴趣。