blob: e7e1604ad6802294c238c100baad765b67b11e20 [file] [log] [blame]
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# output_file [file, ...]
# concatenates all file arguments into output_file, separated by lines.
# elides empty lines (in order to avoid breaking the symbolizer)
# Note: `cat $output $@` is not equivalent - that does not produce new lines
# between inputs.
readonly output="$1"
shift 1
for file in "$@"
while read line
if [ -n "${line}" ]; then
echo "${line}"
done < "${file}"
done > "${output}"