Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- m=`cat /tmp/file.csv|cut -d "," -f2`;
- for m in `echo "$m"`;do
- data=`cat /tmp/file.csv|grep "$m"`;
- no=`echo $data|cut -d "," -f1`;
- ma=`echo $data|cut -d "," -f2`;
- gr=`echo $data|cut -d "," -f3`;
- ca=`echo $data|cut -d "," -f4`;
- tmp=`echo $gr|grep -Eio "[0-9]*$"`;
- if [[ "$tmp" < 20 ]];then
- tu="M";
- else
- tu="V";
- fi
- echo "$ma,$ca,$gr,$tu,$no";
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement