diff --git a/shell-scripts.d/tercet-tags.sh b/shell-scripts.d/tercet-tags.sh index ab09356..881fc85 100755 --- a/shell-scripts.d/tercet-tags.sh +++ b/shell-scripts.d/tercet-tags.sh @@ -12,9 +12,9 @@ do # Every third line (mod 3) add a closing tag, newline, and opening tag. # TODO # How many tabs to add? - awk -i inplace '{print}; NR % 3 == 0 {print "\t\t\t\t\n\t\t\t\t"}' "$file" + awk -i inplace '{print}; NR % 3 == 0 {print "\t\t\t\t\n\t\t\t\t"}' "$file" # Add an opening tag at the beginning and a closing tag at the end because the above awk doesn't. - sed -i '1s/^/\t\t\t\t\n/' "$file" + sed -i '1s/^/\t\t\t\t\n/' "$file" # Also remove the newline at the end of the file. sed -i '$ d' "$file" echo -e "\t\t\t\t" >> "$file"