in reply to trying to format a list

My comments would be along the lines of Laurent_R's above.

... i have a phone list in a text file ...

What is the format of data in this file? Just a few lines, please, not 10,000. Also, please use  <c> ... </c> or  <code> ... </code> tags around code, data and input/output. Please see Markup in the Monastery and Writeup Formatting Tips.

... i am wanting a script to sort them like this ...

Also, how do you want your output sorted? By telephone number, ascending (this is suggested by your output example in the OP)? Otherwise? (Update: I just took another look at the OP and must admit I can't see what the sort order even might be.)

Also, as ww has pointed out above, doing some research and writing some code, even incomplete, will show a desire to learn and will encourage monkish support.


Give a man a fish:  <%-(-(-(-<

Replies are listed 'Best First'.
trying to format a list
by sonikd (Initiate) on Apr 24, 2015 at 18:09 UTC

    thanks for the question, the output file needs to have the following features:

    List in ascending alpha order a-z, no quotations,even columns, inserts area code, inserts exchange prefix the same on all number unless specifically marked otherwise, as can be seen below where there is an exchange prefix specified.

    "Pope, David 7274" "Christy, Kathy 7208" "Payne, Dennis 7035" "Moore, Sue 7101" "Smith, Rick 8821" "Wise, Phil 8823" "Brown, Andrew 7255" "Barnes, Pat 762-9023"