Create archive and nil the content of log file using script

Plese help I need a urgent requirement.

Ex: test.log
requirement : using shell script I need to archive the log file and nil and the content of (test.log) file to 0 kb

and then in the archive folder log files are name to test.tar
test1.tar
test2.tar

EX:

/home/abc/
test.log 20000MB
after nil (content of file 0kb)

test.log 0kb

archive log file moved to

/home/abc/archive/

test.tar
test1.tar
test2.tar

First, this is the wrong forum for URGENT requests.

Second, this sounds like a homework assignment and this is the wrong forum and wrong format for homework assignments.