corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » Dirty dirty batch scripting, helllppp


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author Dirty dirty batch scripting, helllppp
willay
Moderator
Organiser: South East, National Events
Premium Member


Avatar

Registered: 10th Nov 02
Location: Roydon, Essex
User status: Offline
12th Mar 07 at 08:05   View Garage View User's Profile U2U Member Reply With Quote

Okay, basically I've got a bunch of commands that I need to run every morning, one of these files is to run grep (win32 port) on a certain log file which changes its name every day because part of it is the date (in dd.mm.yy format).

On my FreeBSD box, I can do the following:

quote:

[exnetsol@SENS76CSSCOUT01:exnetsol, 083 AM, Mon Mar 12]> cat `date "+%d.%m.%y"`.log
LOL hello
[exnetsol@SENS76CSSCOUT01:exnetsol, 083 AM, Mon Mar 12]>



But this needs to be done on a Windaz boxen using a WIN32 port of date:

quote:

C:\PROGRA~1\UnxUtils\usr\local\wbin>date.exe +%d.%m.%y
12.03.07

C:\PROGRA~1\UnxUtils\usr\local\wbin>



Pokay that works, lets try this...

quote:

C:\PROGRA~1\UnxUtils\usr\local\wbin>cat `date.exe +%d.%m.%y`.log
cat: `date.exe: No such file or directory
cat: +%d.%m.%y`.log: No such file or directory

C:\PROGRA~1\UnxUtils\usr\local\wbin>


Suggestions on what I'm not doing right here?

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Random Pictures On Here Please Mattss Corsa General Chat 57 719
30th Apr 03 at 09:06
by Steve106GTi
 
Interesting news for you (football) GREG 1 Sports Day 121 2075
27th Sep 07 at 18:18
by DR11
 
Panel Filters AdiSRI Help Zone, Modification and ICE Advice 28 431
11th Sep 04 at 23:30
by broster
 
Dirty Intercooler!!! deanmcreynolds26 Help Zone, Modification and ICE Advice 2 136
18th Apr 05 at 11:36
by j1400
 
Big brother ainsley_brader General Chat 22 435
6th Jul 05 at 11:21
by Tom
 

Corsa Sport » Message Board » Off Day » Geek Day » Dirty dirty batch scripting, helllppp 28 database queries in 0.0139160 seconds