LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-22-2010, 08:05 AM   #1
richiep
LQ Newbie
 
Registered: Sep 2010
Posts: 12

Rep: Reputation: 0
Prompt the user for a file to open, extract the XML and write to another text file.


Hello,


I have a huge text file generated from our system and i need a script that asks the user to specify which file to open, Once the file is open, the script should extract ALL of the XML in that file ONLY and then write it to another file.



The XML needs to be extracted in to the new file, currently it is not arranged very well, so will need some line breaks once i have completed the latter.

I am pretty new to linux, iv been on a few courses but that is it. Any help would be much appreciated!

So, to sum up...

take the attached as input
invoke a script
get an xml file from the script as output

Apologies for not including code, i tired using the tags but was having problems posting.

Many Thanks
 
Old 10-22-2010, 09:02 AM   #2
richiep
LQ Newbie
 
Registered: Sep 2010
Posts: 12

Original Poster
Rep: Reputation: 0
can any one help?
 
Old 10-22-2010, 10:02 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Please do not cross-post, it is against the LQ rules. And bumping after just an hour is considered rude.....

If you think you created your other post in the wrong forum, ask a moderator to move it.
 
Old 10-22-2010, 10:10 AM   #4
richiep
LQ Newbie
 
Registered: Sep 2010
Posts: 12

Original Poster
Rep: Reputation: 0
What are you doing then? You are cross posting the same message, looking for brownie points?
 
0 members found this post helpful.
Old 10-22-2010, 10:21 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
No need to get snotty!

You're the one that is breaking the rules with 3 thread about the same subject and asking unfair extra attention from all the others on this board. To remedy that I took 2 of the 3 threads from the zero reply list (which keeps pushing "old" zero reply threads to the top).

If you don't like the way you are treated by me you can:

1) Obey by the LQ rules and don't get bothered ever again by me, or
2) Complain to one of the mods or Jeremy about me.

Have a good day.

BTW: Reported.
 
Old 10-22-2010, 10:22 AM   #6
ordinary
Member
 
Registered: Apr 2007
Location: the Rocket City
Distribution: Debian, Ubuntu, CentOS; in days past Fedora, Solaris, SunOS, 4.2BSD, 4.3BSD, SVR4, AIX, HP-UX
Posts: 101

Rep: Reputation: Disabled
Quote:
Originally Posted by richiep View Post
What are you doing then? You are cross posting the same message, looking for brownie points?
Excellent! Abuse. If there's anything LQ members respond to better than breaking rules, it's abuse.
 
Old 10-22-2010, 10:31 AM   #7
richiep
LQ Newbie
 
Registered: Sep 2010
Posts: 12

Original Poster
Rep: Reputation: 0
That is not abuse just something i noticed. He has littered the system as much as me! I apologised for doing it in another thread yet he found it necessary to comment on all my others. I am new to this and realised i posted something in the wrong area. Not getting snotty at all, not being abusive either. I was just looking for some help, not some ponsey remark in each of my threads! sorry if iv offended!
 
Old 10-22-2010, 03:34 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,988
Blog Entries: 11

Rep: Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880Reputation: 880
And now that this is settled (yes, you, Richie, were breaking the
rules; pointing that out repeatedly is OK from a mods perspective)
can we leave that discussion be and return to the subject? This is,
after all, the original of the series. The dupes are reported for
closure, and that's enough.



Cheers,
Tink
 
  


Reply

Tags
extract, prompt, xml


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract gzip'ed text file? corbis_demon Linux - General 2 09-09-2009 03:15 PM
How to do search & replace on a text file--need to extract URLs from a sitemap file Mountain Linux - General 3 04-05-2009 01:22 PM
Extract certain text info from text file xmrkite Linux - Software 30 02-26-2008 11:06 AM
How to Extract a .xml.bz2 file? en3r0 Linux - Software 2 02-21-2006 09:46 PM
Extract text from a html file gsphanikumar6 Linux - Newbie 2 08-20-2004 01:11 PM


All times are GMT -5. The time now is 01:52 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration