I have the below input data in a file and need to get the output as mentioned below. Need to sort the data by size(Asc/des)/by subdirectory
Below is the input which is there in a file:
120 /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json
532 /root/path1/part-00000-9aa3e423-084b-406b-8c75-d50c369f1943-c000.json
100 /root/path1/Telephone-bill-September-2019-89051_path.doc
72 /root/path2/BishnuPrasadRout[5_0].doc
4 /root/path2/survey.csv
4 /root/path2/hello.c
4 /root/path1/pages.txt
4 /root/path1/hadoopexam.txt
Expected Output
120 /root/path2/part-00000-d3700305-428d-4b13-8161-42051f4ac5ed-c000.json
72 /root/path2/BishnuPrasadRout[5_0].doc
4 /root/path2/survey.csv
4 /root/path2/hello.c
532 /root/path1/part-00000-9aa3e423-084b-406b-8c75-d50c369f1943-c000.json
100 /root/path1/Telephone-bill-September-2019-89051_path.doc
4 /root/path1/pages.txt
4 /root/path1/hadoopexam.txt