troubleshooting Question

Unix Shell script to strip off certain lines & characters and output back into sorted order ( Perl awk sed grep )

Avatar of sunhux
sunhux asked on
Unix OSPerlShell Scripting
7 Comments1 Solution809 ViewsLast Modified:
I have hundreds of files & each of them contain lines as belows :
file1:
  doc-id
  --------
 313323
1413254
  91438

file2:
    doc-id
    --------
 548754
1432834
  321123
....

file533:
.....


Need a script that will script the header "doc-id" & the underline "    --------"
from each of the file & then output them back to the same filename
but with in sorted order (based on the first column's numeric value).

Also the output files should have the preceding spaces (& possibly tabs)
stripped off
ASKER CERTIFIED SOLUTION
Kerem ERSOYNetwork and IT Manager

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros