how store output generated curl request variables
m=$(curl -b cookiez.txt -l http://bmcassistant.org/webac/department/student/currentsemesterdetails.aspx?|grep -o 'href=.*>.*%' | grep -o '>.*%'|sed 's/>//') echo $m>>attendance.txt
output of attendance.txt
10% 80% 50% 100%
i want store these numbers variables m,n,o,p can call later in shell script referencing them $m,$n,$o,$p
i think should trick:
while ifs='' read -r line || [[ -n "$line" ]]; read -a arr <<< $line echo ${arr[@]} done < "attendance.txt"
change @ different values.
instead of reading txt file again, have $m
has string, can this:
read -a arr <<< $m
Comments
Post a Comment