Rscript -e 'u<-"https://stooq.com/q/d/l/?s=%5Espx&i=d&d1=20100101&d2=20220630";z=readLines(u,n=5,warn=FALSE);cat(paste(z,collapse="|"))'