Skip to content

Commit

Permalink
updated comparing PCs with terminal commands.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Dec 13, 2024
1 parent 5cd28e5 commit 9ee08a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notes/comparing PCs with terminal commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ Then, I ran this command to generate a diff file to look at:
echo "<html><head><style>html {background: black;color: white;}del {text-decoration: none;color: red;}ins {color: green;text-decoration: none;}</style></head><body>" > compare.html
while read file; do
f=$(echo "${file}" | sed 's/current\///')
git diff --no-index --word-diff "current/${f}" "new/${f}"
| sed 's/\[\-/<del>/g' | sed 's/-\]/<\/del>/g'
| sed -E 's/\{\+/<ins>/g' | sed -E 's/\+\}/<\/ins>/g'
git diff --no-index --word-diff "current/${f}" "new/${f}" \
| sed 's/\[\-/<del>/g' | sed 's/-\]/<\/del>/g' \
| sed -E 's/\{\+/<ins>/g' | sed -E 's/\+\}/<\/ins>/g' \
| sed '1s/^/<pre>/' | sed '$a</pre>'
done <<< $(find current/ -type f) >> compare.html
echo "</body></html>" >> compare.html
Expand Down

0 comments on commit 9ee08a2

Please sign in to comment.