|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
Help with cat current date's data out of txt file
Greetings all...need some help
I'm trying to pull only the current days data in a specific directory. I know i'm not supposed to put the whole script..but i'm really confused and need a lot of help ![]() dateM='date | cut -c 5-10' ls -lrt /bs/processing/* >> jess1.txt cat jess1.txt ls -lartR |grep "$dateM" >> jess2.txt cat jess2.txt |mail email address rm jess1.txt rm jess2.txt The data is getting pulled into the first txt file. But, when i try to pull the current date out of jess1.txt and place it in jess2.txt. It pulls nothing...a little help please ![]() |
|
#2
|
|||
|
|||
|
try something like this:
Code:
#!/bin/ksh # one second after midnight today=`date +%Y%m%d`"0000.01" touch -t $today dummyfile find /path/to/files -name \* -newer dummyfile -type f > report.txt /usr/bin/mailx -s 'new files' username < report.txt rm -f report.txt exit |
|
#3
|
|||
|
|||
|
Great!
Quote:
Thank you very much. I'll try it when i get to work tonight ![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Help with cat current date's data out of txt file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|