5

Sort input file by the results of a regex

view full story
linux-howto

http://unix.stackexchange.com – I'd like to sort a file based on the results of a regex expression. For example, if I have the following property declarations in Obj-C @property (nonatomic, strong) id <AlbumArtDelegate, UITextFieldDelegate> *albumArtView; // 1 @property (nonatomic, strong, readonly) UIImageView *profileView; // 2 @property (nonatomic, strong, readwrite) UIButton *postFB; // 3 @property (nonatomic, assign) UIButton *saveButton; // 4 By default they will sort in order [4, 1, 2, 3], but I would like to sort them in order of the actual property names, [1, 3, 2, 4]. I can write a regular e (HowTos)