So, currently i have created a code to do this as shown below. This code works and does what it is supposed to do after I echo the variables:
a=`awk \'NR==2 {pri
An alternative using sed and coreutils, assuming space separated input is in infile:
sed
coreutils
infile
n=$(wc -l infile | cut -d' ' -f1) for i in $(seq 1 $n); do sed -n "${i} {p; q}" infile | cut -d' ' -f$i done