Find all subdirectories containing xml files on Linux command line

So I don't forget: The following Linux command shows a list of all subdirectories that contain a least one *.xml file: find . -type f -name '*.xml' | sed -r 's|/[^/]+$||' | sort | uniq This finds all xml files where the extension is all lower case. But since many Windows programs upper case it … Continue reading Find all subdirectories containing xml files on Linux command line

Advanced Records in Lazarus / fpc

Note to self: Delphi's Advanced Records are also available in Lazarus / Free Pascal, but only if they have been explicitly enabled with the modeswitch compiler directive: [delphi] unit SomeUnit; {$mode objfpc}{$H+}{$modeswitch advancedrecords} interface type TSomeRecord = record FSomeField: integer; function SomeMethod: integer; end; implementation function TSomeRecord.SomeMethod: integer; begin Result := FSomeField; end; end. [/delphi] … Continue reading Advanced Records in Lazarus / fpc