The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Bash Shell to sh Shell In a Script saurabh84g Shell Programming and Scripting 8 08-29-2008 05:51 AM
Bash Source Code bhargava Shell Programming and Scripting 1 11-20-2006 03:45 PM
Bash Shell BG_JrAdmin Linux 1 08-07-2006 01:56 PM
Bash shell ... VijayHegde Shell Programming and Scripting 2 06-06-2006 08:09 AM
how to convert from korn shell to normal shell with this code? forevercalz Shell Programming and Scripting 21 11-23-2005 02:18 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-06-2009
the wonderer the wonderer is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 5
xml code in bash shell

Hi,

I am trying to develop a bash script that contains an xml code. I want to put the xml code inside the bash script. Is there a way to make that happen?!

My goal is to create a script that can allow the user to enter some parameters which can be passed by the script to the xml code .

Kindly advise ..

Thank you,,
  #2 (permalink)  
Old 01-06-2009
Yogesh Sawant's Avatar
Yogesh Sawant Yogesh Sawant is offline Forum Staff  
Part Time Moderator and Full Time Dad
  
 

Join Date: Sep 2006
Location: Rossem, Tazenda
Posts: 1,086
are you trying to accept some parameters from the user and put them in an XML file? that's possible. sed or perl would be of help.
  #3 (permalink)  
Old 01-06-2009
the wonderer the wonderer is offline
Registered User
  
 

Join Date: Jan 2009
Posts: 5
Quote:
Originally Posted by Yogesh Sawant View Post
are you trying to accept some parameters from the user and put them in an XML file? that's possible. sed or perl would be of help.
Hi Yogesh,

Thanks for responding,

Yes, I am trying to do that. But the xml code is not separated. To be more specific:

What I am trying to do is to put the xml code in a sub function or a message that can be called later in the script, as the following:

Code:
#! /bin/bash


message= "POST /Servername HTTP/1.1
User-Agent: Admin
Host: localhost
Authorization: Basic <authentication>
Content-Type: text/xml
Content-Length: 915

<?xml version="1.0"?>

...

<...>"


# To run the xml code:
$message | telnet 0 10010
The problem is that after the telnet is done the XML request is not seen by the server.

Can you please explain how I can use the perl or sed?


Thanks again !
Closed Thread

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0