1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| cat appendix1 | while read file
do
category='$(echo $file | cut -d"," -f4)'
isbn='$(echo $file | cut -d"," -f1)'
author='$(echo $file | cut -d"," -f3)'
title='$(echo $file | cut -d"," -f2)'
# eval echo $category
if [ "$category" = "Horror" ];
then
echo -n "ISBN:" >> $HOME/tutorial/horror_books
eval echo $isbn >> $HOME/tutorial/horror_books
echo -n "Author:" >> $HOME/tutorial/horror_books
eval echo $author >> $HOME/tutorial/horror_books
echo -n "Title:" >> $HOME/tutorial/horror_books
eval echo $title >> $HOME/tutorial/horror_books
elif [ "$category" = "Childrens" ];
then
... else ... |
Partager