cleverfere.blogg.se

Compare notepad++ output to file
Compare notepad++ output to file











In english: capture any punctuation or special character as caputure group 1 (\\1)

  • = match any character that is NOT a letter, digit or space.
  • = match any character NOT in a specific list of characters.
  • = match a character from a specific list of characters.
  • The script pattern "s/(find)/(replace)/" specifically performs the pattern match. Sed can do a lot more than regular expression pattern matching. I don't know what other characters might have special meaning, but I want to escape them all with a backslash: sed -i -E "s/()/\\\\\\1/g" ~/. What I don't know is how much I don't know about bash.
  • $() - idk what this does but i think it can execute code.
  • Requires bash v4+ for associative arrays. Writes the name to Output_file if changed. To print to the terminal window: /path/to/compare.py Ĭompares name/value pairs in 2 files in the format name value\n. With a few extra lines, you can make it either print to an outputfile, or to the terminal, depending on if the outputfile is defined: Mismatch = for item in data1 if not item in data2]

    compare notepad++ output to file

    Return ĭata1 = readfile(file1) data2 = readfile(file2)

    compare notepad++ output to file

    Litteraly sticking to the question (file1, file2, outputfile with "has changed" message) the script below works.Ĭopy the script into an empty file, save it as compare.py, make it executable, run it by the command: /path/to/compare.py įile1 = sys.argv file2 = sys.argv outfile = sys.argv













    Compare notepad++ output to file