sdf-labs / sdf-cli

This is the main repository for SDF documentation found at docs.sdf.com, as well as public schemas, benchmarks, and examples
45 stars 4 forks source link

Add EOL at EOF in example SQL files #8

Closed findepi closed 1 week ago

findepi commented 2 months ago

A user may inspect created files by outputting them directly to their terminal with cat. If a file does end with end-of-line, some terminals/shell configurations will happily place the next prompt together with the last line of the file output.

This commit updates only .sql, .txt and .yml files (omitting e.g. .csv) files. It was performed with

find . -type f \( -name \*.sql -o -name \*.txt -o -name \*.yml \) \
    -exec bash -c 'test "$(tail -c 1 "$0")"' {} \; \
    -exec bash -c 'echo >> "$0"' {} \;