I have the following script. It correctly returns the first instance of an integer from a text file#!/bin/bash#create file listmtp-files > file_list.txtecho Hello World#retrieve File ID from file listid=$(awk -F'[ \t]*:[ \t]*' '$1 == File ID{print $2; exit}' file_list.txt)echo $idBut I need an array containing ALL File ID integers values without duplicates.For example, if the following is my file_list.txt, my script should return an array containing 8,9,10libmtp version: 1.1.10mtp-files: Successfully connectedAndroid device detected, assigning default bug flagsListing File Information on Device with name: LGE 360 CAM MTP DeviceFile ID: 8   Filename: 20161212_095355.jpg   File size 625762 (0x0000000000098C62) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 9   Filename: 20161212_095416.jpg   File size 602264 (0x0000000000093098) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 10   Filename: 20161212_095520.jpg   File size 642770 (0x000000000009CED2) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 8   Filename: 20161212_095355.jpg   File size 625762 (0x0000000000098C62) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 9   Filename: 20161212_095416.jpg   File size 602264 (0x0000000000093098) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 10   Filename: 20161212_095520.jpg   File size 642770 (0x000000000009CED2) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 8   Filename: 20161212_095355.jpg   File size 625762 (0x0000000000098C62) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 9   Filename: 20161212_095416.jpg   File size 602264 (0x0000000000093098) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileFile ID: 10   Filename: 20161212_095520.jpg   File size 642770 (0x000000000009CED2) bytes   Parent ID: 2   Storage ID: 0x00010001   Filetype: JPEG fileOK.
retrieve array of integers from text file without duplicates
awk