Wrox Programmer Forums
|
Other Programming Languages If you have a coding issue to discuss about another language that really isn't provided for in any other forum here (not ASP.NET C#, C++, VB, PHP, JavaScript, Python, Java, Perl, Applescript, XML or any of the other forum topics we have), post it here. Enough discussion on a language we don't have covered could prompt a new forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Other Programming Languages section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 1st, 2006, 08:47 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default BATCH

I am writing a little batch file to check something for me, and I have run into a problem. This is likely just a limitation of batch files in general, but lets see if you guys can find a way around it.

Basically, I want to set a variable as the stdout of another command.

my batch file does the following:
it uses curl to download an html file, and then gets the md5 hash of that file and spits it into a text file. essentially, I need to set a variable to that spat out hash (e.g. SET hash=`cat hash.txt`), but it doesnt seem like batch files, or the windows command line in general, are able to execute programs within a line.

Is there a way to get that hash to either be a variable within this batch file, or to get it to be the stdin for another batch file (so that I could just use %1 to designate the hash).

Im trying to find when the webpage changes, so I have a hash of what the html file is now, and I want to compare it to what curl downloads every 15 minutes. If you can think of a better way to do this, let me know.

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch problem Fr3c Other Programming Languages 0 January 16th, 2008 10:58 AM
Batch File Allan320 Access 10 June 8th, 2006 06:46 AM
SQL Batch Processing? acdsky Pro VB Databases 0 October 7th, 2005 09:24 AM
yet another batch update billyducs Classic ASP Databases 1 July 31st, 2003 10:31 AM
batch update billyducs Classic ASP Databases 4 July 30th, 2003 11:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.