Good evening everyone.
Anyone ever made a flow to alphabetically sort a text file with many lines each with a string?
Thank you.
sort text file
Moderator: Martin
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: sort text file
I don't remember there is any, but I use it in one part of my AM text tools branch. I retrieve the text from clipboard, sort it and set back to clipboard. The script is one line with nested function.
Replace text witth the text variable (file_text if you init the text file) and clip_data to the sorted variable.
Code: Select all
clip_data = join(removeElementValue(sort(split(text, "\\r?\\n")), ""), "\n");
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- tsolignani
- Posts: 187
- Joined: 12 Jan 2019 11:53
- Location: Vignola, Mo, Italy
- Contact:
Re: sort text file
Thank you so much. It does work like a charm!
You always deliver.
Thanks again and have a nice day.
You always deliver.
Thanks again and have a nice day.