'Large file into multiple small files as an attachment through mail using unix script

I have a large file "abc.csv" of size 300MB and I need to send this file as an attachment through mail using unix command but the file is of huge size, I want to split this large files into multiple small files and send it as an attachment through mail.

This is the code I have written:

file_name = "Desktop/abc.csv"
wl_count  = 'cat "Desktop/abc.csv" | wc -l'

if [ $wl_count -gt 1 ]
then
echo "Sending this file through mail." | mail -s "Please find attachment" -r [email protected] -a $file_name [email protected]
echo "File sent"
fi

As it is large file, how to split the large file into multiple files and send those multiple files as an attachment through mail. I know there is a split unix command where we can send multiple files based on no. of lines or no. of bytes but don't know what is the change I need to make in above code.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source