![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems . |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Automatic script | TShirt | UNIX for Advanced & Expert Users | 5 | 06-05-2008 05:34 AM |
| Help On Unix Script Count Line Of File | fafo77 | Shell Programming and Scripting | 4 | 02-11-2008 07:30 AM |
| Script for automatic deletion of trash file of mail server | crown2100bd | SUN Solaris | 1 | 09-20-2007 09:01 AM |
| Automatic download of csv file using a shell script | figaro | Shell Programming and Scripting | 1 | 01-13-2007 08:53 PM |
| How to count the record count in an EBCDIC file. | oracle8 | UNIX for Dummies Questions & Answers | 1 | 07-26-2006 08:22 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
Script for automatic count the file i have
Hi
I have a folder will all the file ftp in everyday. I have to go in every morning to check to see everynight have all the 2000+ file have been all FTP in. so every morning i will check like this # ls -l *_20080904*_20080904* |wc if there is 2714 that mean is correct. File name: summer_3024190_200809041200_2008090413000.csv Can someone help me to generate a script so that everyday i just need to check the log file will do? Thanks in adv Summer |
|
||||
|
Do you have the GNU date command? If so you can try:
Code:
YESTERDAY=$(date --date yesterday +%Y%m%d)
lines=$(ls *_${YESTERDAY}*_${YESTERDAY}* |wc -l)
Last edited by Annihilannic; 09-05-2008 at 12:07 AM.. Reason: typos galore |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|