@ajames,

Maybe this can help you manually execute the workflow described by James.

1. Create an empty bbedit text document:

    File > New > Text Document
    
2. Insert your files into the new document:

    Edit > Insert > File Contents...

3. Check that the imports are separated by a blank line.

4. Copy this command:

    perl -pe 's/(.)\n/\1\t/g' | sort | perl -pe 's/\t/\n/g'
    
5. Paste the command in:

    Text > Run Unix Command...
    
6. Choose your preferred output options and click OK.

If you need to further automate the process you could create a shell script:

    ```
    #!/bin/sh
    
    cd "/PATH/TO/SOURCE/DIRECTORY" ; # Replace with the directory path.
    cat * | perl -pe 's/(.)\n/\1\t/g' | sort | perl -pe 's/\t/\n/g' > 
"/PATH/TO/OUTPUT_FILE.txt" ; # Replace with the output file path.
    ```
    
HTH

Best regards,

Jean Jourdain

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/8fae00d3-dec6-4c88-a33b-352501899accn%40googlegroups.com.

Reply via email to