Shell Programing with awk Tool

I'm working on a program in with shell programming and it needs to be able to delete the contents of files in the Home directory on certain days of the week.(like tuesday). Can anyone help me with this?

Thanks in advance, Taffy.

Can you show us the code you have so far, and tell us how it misbehaves?

Regards

All that I have so far is this

#!/bin/bash
date | awk '[ if $1 =="Tue" rm -rf File ]' //I tried this but it didnt work
if [ $1="Tue" ] // When i tried this it kept jumping to wrong indicating $1 !="Tue"
then rm -rf File
else
echo "Wrong"
fi

Should be something like:

dat=$(date "+%a")

if [ "$dat" = "Tue" ]; then
  # your actions
fi

Thank you that worked but how would i be able to determine the three oldest files?(these would be the ones i would delete)
what function would i use to count and display the files in the home directory?
Sorry i know this is asking a lot but I could realy use the help, my exams dont leave me with alot of time.
thanks in advance.

Check the manpages of ls and tail.

how would you archive a file using tar with and give it a differnt name?

first, you check man page of tar. read how its used, then try to tar your files... keep trying until you can't solve , then post here again.