Hi,
I want to order a list, my list is similar to this:
Code:
lrwxrwxrwx. 1 root root 62 Jun 4 21:54 fileA1 -> /.../ProgramA/fileA1
lrwxrwxrwx. 1 root root 46 Jun 5 09:06 fileA2 -> /.../ProgramA/fileA2
lrwxrwxrwx. 1 root root 63 Jun 4 21:54 fileB1 -> /.../ProgramB/bin/fileB1
lrwxrwxrwx. 1 root root 73 Jun 10 13:10 fileC1 -> /.../ProgramC/run/fileC1
lrwxrwxrwx. 1 root root 68 Jun 10 13:10 fileC2 -> /.../ProgramC/run/fileC2
lrwxrwxrwx. 1 root root 66 Jun 10 13:10 fileC3 -> /.../ProgramC/run/fileC3
I want to make a script that show me a reult like this (the name of the program: ProgramA, ProgramB .. alway they are on the 5° row)
Code:
ProgramA
fileA1 fileA2
ProgramB
fileB1
ProgramC
fileC1 fileC2
fileC3
I'm beginner so I only tried this:
Code:
@PROGRAMS = `ls -l /usr/local/bioinfo`;
print @PROGRAMS,"\n";
Well the list is bigger, and always I add more programs, how can I write a script that always show me all programs and its files?
Thanks