Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old March 30th, 2006, 05:51 PM
Ronack Ronack is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 293 Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 19 h 18 m 33 sec
Reputation Power: 5
Echo html in a batch file

Hi gang,

I need to echo html markup into a file via my batch file like this
Code:
echo  <center><a href=".....</a></center> >> index.html

Of course there is a lot more to the batch file than this but this is where it breaks. Is there a way to echo html markup into the new index.html?

I suspect that the batch file doesn't like < and >.

Reply With Quote
  #2  
Old March 30th, 2006, 10:33 PM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 548 L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 20 h 21 m 37 sec
Reputation Power: 42
Send a message via AIM to L7Sqr
Have you tried using quotes?
__________________
-- I'll provide you with reference points; if they dont work, refer to something else.

While I've regularly been provided 'working' software that fails to build or work as advertised I've yet to face a Copyright/Warranty/License that isnt exact to the finest detail. Priorities, my friend. Priorities.

Reply With Quote
  #3  
Old March 31st, 2006, 12:34 PM
cybersaga's Avatar
cybersaga cybersaga is offline
I have a red lunch bag
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jan 2005
Location: The armpit of Niagara
Posts: 3,125 cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 3 h 24 m 8 sec
Reputation Power: 333
Using quotes will unfortunately include the quotes in the output. I don't think there is a way you can do this with the echo command.
__________________
Web Design Tips - Posting and You

If I've been helpful, and/or you're really nice, consider buying something from my Amazon.com wishlist.
  • There is no room for pride when trying to be the best at what you do.
  • Friends don't let friends use bad code.
The club is dead.

Reply With Quote
  #4  
Old March 31st, 2006, 01:49 PM
L7Sqr L7Sqr is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Location: Constant Limbo
Posts: 548 L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level)L7Sqr User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 20 h 21 m 37 sec
Reputation Power: 42
Send a message via AIM to L7Sqr
My file (html_test.sh):
Code:
#!/usr/local/bin/bash
echo "<html><head>Test</head><body><a href=\"www.google.com\">google</a></body></html>" >> out.html


I run:
Code:
./echo_test.sh


I get (out.html):
Code:
<html><head>Test</head><body><a href="www.google.com">google</a></body></html>

Reply With Quote
  #5  
Old March 31st, 2006, 02:03 PM
cybersaga's Avatar
cybersaga cybersaga is offline
I have a red lunch bag
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jan 2005
Location: The armpit of Niagara
Posts: 3,125 cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level)cybersaga User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 3 h 24 m 8 sec
Reputation Power: 333
Well, he mentioned he wants to do this in a batch file, so I'm assuming he's on Windows. On Windows, the echo command will include the quotes; at least WinXP.

Reply With Quote
  #6  
Old March 31st, 2006, 03:58 PM
Ronack Ronack is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 293 Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 19 h 18 m 33 sec
Reputation Power: 5
Correct I am on windows.

Reply With Quote
  #7  
Old March 31st, 2006, 05:04 PM
Ronack Ronack is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 293 Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level)Ronack User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 19 h 18 m 33 sec
Reputation Power: 5
A light bulb came on a minute ago and I remembered that I had done this in another script probably 2 years ago and it works.

Here's how to include HTML in a Batch File for output as per my example.
USE THE CARROT
Code:
echo  ^<center^>^<a href="someur.com"^>something^</a^>^</center^> >> index.html

 
Comments on this post
cybersaga agrees: Nice! I knew there had to be something like this, but I couldn't find it. Thanks for posting your
solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Echo html in a batch file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway