#!/bin/bash while read p; do echo "$p" | awk '{split($0,a,"|"); system("curl -s " a[2] " > adlists/"a[1])}' done < adfilelist.txt