【发布时间】:2014-02-15 11:54:23
【问题描述】:
我目前正在编写一个 bash scipt,我需要在其中连接输出变量中的结果。但是我需要用换行符 '\n' 将它们分开,这似乎不起作用......有什么想法吗???
#!/bin/bash
for i in "./"*
do
#echo "$i"
tmp=$('/home/eclipseWorkspace/groundtruthPointExtractor/Debug/groundtruthPointExtractor' "./"$i)
#echo $Output
#printf "$i $Output\n">> output.txt
Output=$Output$(printf $'\n %s %s' "$i" "$tmp" )
done
echo $Output
echo $Output> output.txt
【问题讨论】: