I have input text file e.g myfile.txt which is contains data like WO_ID ------------------------------------------------------------------------moveover_virus_8493020020_virus.final moveover_virus_7483920322_virus.csvwork  etc. only phone number is changing I have some 13 work orders like this I need to take only number as a input from this for that I need a script in perl. please help me to create that script I am trying grep but I am unable get only numbers.
read phone numbers from file and store them in other file uniquely
shell script
Looking at your input file you can do something like this, using awk:awk -F_ '{print $3}' inputfile | uniq > outputfileor using grep,grep -o -E '[0-9]+' inputfile | uniq > outputfileusing sed,sed 's/[^0-9]*//g;/^\s*$/d' inputfile | uniq 