LinuxQuestions.org
Register a domain and help support LQ
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 01-19-2008, 02:15 PM   #1
ragavendran31
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
Lightbulb Unable to delete the lines in xml FILES


Hi ,

I want to delete first 5 lines and last 5 lines from multiple XML FILES.

I am able to do it for single file but not for multiple files.

Any help would be really appreciated.

Cheers,
Ragavendran R
 
Old 01-19-2008, 02:24 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
It depends on which method you chose to edit files. If you use sed, it can manage multiple files in a single command line. In alternative you can
1. use a for loop over a list of files
2. use find with the -exec option or in conjunction with xargs.
 
  


Reply


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
delete lines from files bharatbsharma Programming 5 10-25-2007 09:43 AM
awk/gawk/sed - read lines from file1, comment out or delete matching lines in file2 rascal84 Linux - General 1 05-24-2006 10:19 AM
Unable to delete files from Windows dareino Fedora 2 03-19-2006 12:49 PM
Unable to delete files of MySQL laguna01 Red Hat 7 10-21-2005 05:51 AM
Unable to delete files via php on Linux burnham Linux - Newbie 6 05-26-2005 09:56 AM


All times are GMT -5. The time now is 08:30 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration