Difference between revisions of "Bluefish"

From wiki
Jump to navigation Jump to search
(Created page with "My favourite code editor. In preferences - External Commands add the SaveVersion script to save a file with the current timestamp. The file is only copied if it differs from...")
(No difference)

Revision as of 14:01, 8 June 2019

My favourite code editor.


In preferences - External Commands add the SaveVersion script to save a file with the current timestamp. The file is only copied if it differs from the last version saved.

#!/bin/bash

FILE=$1
if (( ! ls -1 "${FILE}"_* > /dev/null ) || ( ! diff "${FILE}" `ls -1 "${FILE}"_*|tail -1` > /dev/null ))
 then
  cp "${FILE}" "${FILE}_"`date +%Y%m%d_%H%M%S`
fi