set bannedListAlias to alias "Thor:Users:chris:Desktop:Banned_List.txt"
----------------------------------------------------------------------------------------------
# Using 'read with delimiter':
set bannedList to read bannedListAlias using delimiter linefeed
# Purge any empty list items:
set tempList to {}
if bannedList contains "" then
repeat with i in bannedList
set _temp to contents of i
if _temp ≠ "" then
set end of tempList to _temp
end if
end repeat
set {bannedList, tempList} to {tempList, ""}
end if
bannedList
----------------------------------------------------------------------------------------------
# Using the 'grep' command-line tool:
set cmd to "egrep ^[0-9]+ " & quoted form of POSIX path of bannedListAlias
set bannedList to paragraphs of (do shell script cmd)
----------------------------------------------------------------------------------------------
# Using the 'sed' command-line tool:
set cmd to "sed -nE /^[0-9]+/p " & quoted form of POSIX path of bannedListAlias
set bannedList to paragraphs of (do shell script cmd)
----------------------------------------------------------------------------------------------
# Using the Satimage.osax (My preferred method):
set bannedList to find text "^\\d+$" in bannedListAlias ¬
all occurrences true ¬
with regexp and string result
----------------------------------------------------------------------------------------------