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