Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file = example.csv
- fileDone = os.path.abspath('/home/bw/temp/%s'%file1)
- with open(fileDone, 'w+') as myFile:
- a = csv.writer(myFile, delimiter=',')
- a.writerow(['login report for %s from %s to %s:nn'%(name[0],start_date,end_date)])
- dato = ['Username','Logins','Platform']
- a.writerow(dato)
- for vizL in vizList:
- data =[str(vizL[0]),str(vizL[1]),"Viz"]
- a.writerow(data)
- for appL in appList:
- data =[str(appL[0]),str(appL[1]),"Analytics"]
- a.writerow(data)
- #!/bin/bash
- python scriptname.py
- REPORT_MONTH=`/bin/date "+%d %B %Y"`
- echo -e "Attached is the login reports for $REPORT_MONTHnnnnnnGenerated by: $0" | mutt -a /home/bw/temp/example.csv -c my@email.com -s "Daily Login Reports For $REPORT_MONTH"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement