I am currently writing a bash scipt where i need to concatenate the results within the output variable. However I need them to be seperated by newline charcater '\n' which does not seem to work... Any ideas ???
#!/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