I want to cut a 211,548,559 lines file into 10 smaller files. So, the first file, for example will have 1st to 21154856th line
I would like to write a for loop with a seq that allows me to automatize the process.
I tried to create a function first and then a loop with seq.
run_sed(){
sed -n $1p Bar08_depth_chr1.txt > Bar8_d_c1_$1.txt
}
for pos in seq 1 10 211548559
do
run_sed $pos
done
This script didn't work. I believe its because the $1 in sed -n 1$p
But I don't know how to solve it