I have a file with below format and I want handle using key, value pair.
Format:
table name=type of load
Sample Data:
student=full
department=delta
Pseudo code:
for(i=0;i<arr.size;i++)
{
if key.table_name=arr[i]
then
if value. Type_of_load=full
then
process some action
else
if value.type_of_load=delta
then
process some action
fi
fi
fi
Can anyone how to get the key and values using shell script ?
Something like that?
while IFS== read -r key value; do
case $key in
delta)
echo "key type of $value is delta"
;;
full)
echo "key type on $value is full"
;;
esac
done < "$file"
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다