How can I move lines containing specific strings (ie. 005, and 007) to the top of the target file?
Contents of target file:
XXX_008 XXX_001 XXX_002 XXX_009 XXX_003 XXX_006 XXX_005 ----> located here XXX_007 ----> and here XXX_004
How can I move lines
XXX_007 to the top? Retaining the rest of the files order? Like so:
XXX_005 ----> now here XXX_007 ----> and here XXX_008 XXX_001 XXX_002 XXX_009 XXX_003 XXX_006 XXX_004
all the rest retain the same order they were originally in.
... it would be nice to be able to only specify only the numbers when moving lines since I always use double zero padded numbers like any-name_001, any-name_002, etc.
Is this possible somehow?